Skip to content

Commit 9464c1e

Browse files
authored
Update README.md
1 parent c68bbfe commit 9464c1e

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,11 @@ XmlBuilder builder = XmlBuilder.create("Projects")
389389
.e("JetS3t").a("language", "Java").a("scm", "CVS")
390390
.e("Location").a("type", "URL")
391391
.t("https://jets3t.s3.amazonaws.com/index.html");
392+
System.out.println(builder.toXml(Xml.XmlStringBuilder.Step.TWO_SPACES));
393+
System.out.println(builder.toJson(Json.JsonStringBuilder.Step.TWO_SPACES));
392394
```
393395

394-
Generates the following XML document:
396+
Generates the following XML and JSON documents:
395397

396398
```xml
397399
<?xml version="1.0" encoding="UTF-8"?>
@@ -404,6 +406,28 @@ Generates the following XML document:
404406
</JetS3t>
405407
</Projects>
406408
```
409+
```json
410+
{
411+
"Projects": {
412+
"underscore-java": {
413+
"-language": "Java",
414+
"-scm": "SVN",
415+
"Location": {
416+
"-type": "URL",
417+
"#text": "https://github.com/javadev/underscore-java/"
418+
}
419+
},
420+
"JetS3t": {
421+
"-language": "Java",
422+
"-scm": "CVS",
423+
"Location": {
424+
"-type": "URL",
425+
"#text": "https://jets3t.s3.amazonaws.com/index.html"
426+
}
427+
}
428+
}
429+
}
430+
```
407431

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

0 commit comments

Comments
 (0)