Skip to content

Commit b0b64ad

Browse files
committed
Introduced version 1.46
1 parent 78b102b commit b0b64ad

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Include the following in your `pom.xml` for Maven:
2828
<dependency>
2929
<groupId>com.github.javadev</groupId>
3030
<artifactId>underscore17</artifactId>
31-
<version>1.45</version>
31+
<version>1.46</version>
3232
</dependency>
3333
...
3434
</dependencies>
@@ -37,7 +37,7 @@ Include the following in your `pom.xml` for Maven:
3737
Gradle:
3838

3939
```groovy
40-
implementation 'com.github.javadev:underscore17:1.45'
40+
implementation 'com.github.javadev:underscore17:1.46'
4141
```
4242

4343
### Usage
@@ -282,6 +282,35 @@ String json =
282282
List<String> names = U.selectTokens(U.fromJsonMap(json), "//Products[Price>=50]/Name/text()");
283283
// [Anvil, Elbow Grease]
284284
```
285+
Easily build XML documents using code structured like the final document.
286+
287+
This code:
288+
289+
```java
290+
XmlBuilder builder = XmlBuilder.create("Projects")
291+
.e("underscore-java").a("language", "Java").a("scm", "SVN")
292+
.e("Location").a("type", "URL")
293+
.t("https://github.com/javadev/underscore-java/")
294+
.up()
295+
.up()
296+
.e("JetS3t").a("language", "Java").a("scm", "CVS")
297+
.e("Location").a("type", "URL")
298+
.t("https://jets3t.s3.amazonaws.com/index.html");
299+
```
300+
301+
Produces this XML document:
302+
303+
```xml
304+
<?xml version="1.0" encoding="UTF-8"?>
305+
<Projects>
306+
<underscore-java language="Java" scm="SVN">
307+
<Location type="URL">https://github.com/javadev/underscore-java/</Location>
308+
</underscore-java>
309+
<JetS3t language="Java" scm="CVS">
310+
<Location type="URL">https://jets3t.s3.amazonaws.com/index.html</Location>
311+
</JetS3t>
312+
</Projects>
313+
```
285314

286315
Underscore-java is a java port of [Underscore.js](https://underscorejs.org/).
287316

pom-central17.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.javadev</groupId>
55
<artifactId>underscore17</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.45</version>
7+
<version>1.46</version>
88
<name>java 17 port of Underscore.js</name>
99
<description>The java 17 port of Underscore.js</description>
1010
<url>https://github.com/javadev/underscore-java17</url>

pom-pack17.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.javadev</groupId>
55
<artifactId>underscore17</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.45</version>
7+
<version>1.46</version>
88
<name>java 17 port of Underscore.js</name>
99
<description>The java 17 port of Underscore.js</description>
1010
<url>https://github.com/javadev/underscore-java17</url>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.javadev</groupId>
55
<artifactId>underscore11</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.45-SNAPSHOT</version>
7+
<version>1.46-SNAPSHOT</version>
88
<name>java 17 port of Underscore.js</name>
99
<description>The java 17 port of Underscore.js</description>
1010
<url>https://github.com/javadev/underscore-java17</url>

0 commit comments

Comments
 (0)