Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README.md

  • Loading branch information...
commit 969a354cf15840f011bde83140b806bfa76103c9 1 parent 3f9f626
@jacksenechal jacksenechal authored
Showing with 19 additions and 16 deletions.
  1. +19 −16 README.md
View
35 README.md
@@ -129,22 +129,6 @@ If you want to parse multiple files, you have multiple possibilites:
* You can hope everything goes well anyway. This behaviour is not
guaranteed work always, if ever. Use option #1 if possible. Thanks!
-Objects can be also be used to rebuild the XML:
-
-```javascript
-var fs = require('fs'),
- xml2js = require('xml2js');
-
-var obj = { name: "Super", Surname: "Man", age: 23};
-
-var builder = new xml2js.Builder();
-var xml = builder.buildObject(obj);
-```
-
-At the moment, a one to one bi-directional conversion is guaranteed only for
-default configuration, except for `attrkey`, `charkey` and `explicitArray` options
-you can redefine to your taste.
-
So you wanna some JSON?
-----------------------
@@ -170,6 +154,25 @@ you just need to increase the `maxLength` limit by creating a custom inspector
`var inspect = require('eyes').inspector({maxLength: false})` and then you can
easily `inspect(result)`.
+XML builder usage
+-----------------
+
+Objects can be also be used to build XML:
+
+```javascript
+var fs = require('fs'),
+ xml2js = require('xml2js');
+
+var obj = { name: "Super", Surname: "Man", age: 23};
+
+var builder = new xml2js.Builder();
+var xml = builder.buildObject(obj);
+```
+
+At the moment, a one to one bi-directional conversion is guaranteed only for
+default configuration, except for `attrkey`, `charkey` and `explicitArray` options
+you can redefine to your taste. Writing CDATA is not currently supported.
+
Options
=======
Please sign in to comment.
Something went wrong with that request. Please try again.