fluentxmlwrapper

a simple wrapper for XML Processing with a fluent interface

License

License

GroupId

GroupId

de.drbunsen.common
ArtifactId

ArtifactId

fluentxmlwrapper
Last Version

Last Version

0.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

fluentxmlwrapper
a simple wrapper for XML Processing with a fluent interface
Project URL

Project URL

http://github.com/askeron/fluentxmlwrapper
Source Code Management

Source Code Management

http://github.com/askeron/fluentxmlwrapper/tree/master

Download fluentxmlwrapper

How to add to project

<!-- https://jarcasting.com/artifacts/de.drbunsen.common/fluentxmlwrapper/ -->
<dependency>
    <groupId>de.drbunsen.common</groupId>
    <artifactId>fluentxmlwrapper</artifactId>
    <version>0.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.drbunsen.common/fluentxmlwrapper/
implementation 'de.drbunsen.common:fluentxmlwrapper:0.5.0'
// https://jarcasting.com/artifacts/de.drbunsen.common/fluentxmlwrapper/
implementation ("de.drbunsen.common:fluentxmlwrapper:0.5.0")
'de.drbunsen.common:fluentxmlwrapper:jar:0.5.0'
<dependency org="de.drbunsen.common" name="fluentxmlwrapper" rev="0.5.0">
  <artifact name="fluentxmlwrapper" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.drbunsen.common', module='fluentxmlwrapper', version='0.5.0')
)
libraryDependencies += "de.drbunsen.common" % "fluentxmlwrapper" % "0.5.0"
[de.drbunsen.common/fluentxmlwrapper "0.5.0"]

Dependencies

runtime (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.32
org.jetbrains.kotlin : kotlin-reflect jar 1.4.32

Project Modules

There are no modules declared in this project.

CI License Maven Central Required Java 8.0

fluentxmlwrapper

A java library with a simple wrapper for XML Processing with a fluent interface. In contrast to other similar project the interface follows the principle of clean code and can be used for reading and writing XML documents.

Maven dependency

<dependency>
    <groupId>de.drbunsen.common</groupId>
    <artifactId>fluentxmlwrapper</artifactId>
    <version>0.5.0</version>
</dependency>

Snapshots

Add the following repository to use snapshots.

Maven

<repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

Gradle (Groovy)

repositories {
    mavenCentral()
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots/'
    }
}

Gradle (Kotlin)

repositories {
    mavenCentral()
    maven {
        setUrl("https://oss.sonatype.org/content/repositories/snapshots/")
    }
}

Example

final String newXml = FluentXmlWrapper.of(new File("text.xml"))
        .getElement("devices")
        .addElement("device")
        .setAttribute("id", "41234")
        .addElement("ipaddress").setText("192.168.0.123").getParentElement()
        .addElement("ipaddress").setText("192.168.0.201").getParentElement()
        .toXmlWithDefaultUtf8Header(false);

Versions

Version
0.5.0
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.1
0.1.0