Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README.md

  • Loading branch information...
commit ef331c47ffc88ee950b619d11a1e131e5af1966e 1 parent 941f325
@c4milo c4milo authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
10 README.md
@@ -14,7 +14,7 @@ $ npm install xml2json
```
## Usage
-```
+```javascript
var parser = require('xml2json');
var xml = "<foo>bar</foo>";
@@ -23,16 +23,16 @@ console.log(json);
```
## API
-```
+```javascript
parser.toJson(xml, options);
```
-```
+```javascript
parser.toXml(json, options);
```
### Options object
-```
+```javascript
var options = {
object: false,
reversible: false,
@@ -47,7 +47,7 @@ var options = {
* **trim:** Removes leading and trailing whitespaces as well as line terminators in element values.
* **sanitize:** Sanitizes the following characters:
-```
+```javascript
var chars = { '<': '&lt;',
'>': '&gt;',
'(': '&#40;',
Please sign in to comment.
Something went wrong with that request. Please try again.