Toggle navigation
P3X GitList Snapshot
GitHub
Repo
Changelog
To do
Releases
Themes
Change log
Loading change log ...
To do ...
Loading todo ...
browsing:
6983c8164e13503185cc8867521c7d1fdb90428f
Branches
0.1
0.2
html-sanitizer
html-sanitizer-and-mocha-specs
master
sanitize-oversight
Tags
v0.11.2
v0.11.0
v0.9.2
v0.9.0
v0.8.2
v0.6.2
v0.6.1
v0.6.0
v0.5.1
v0.5.0
v0.4.0
v0.3.2
v0.3.1
v0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Files
Commits
Log
Graph
Stats
xml2json.git
README.md
RSS
Git
Fetch origin
Download
ZIP
TAR
Clone
Raw
View
History
Clone
SSH
HTTPS
Blames found: 10
Mode: markdown
Binary: false
Hang on, we reloading big blames...
440a652d
# Simple XML2JSON Parser.
6a202d68
440a652d
It does not parse the following elements: * CDATA sections * Processing instructions * XML declarations * Entity declarations * Comments ## Installation npm install xml2json ## Usage
6a202d68
```javascript var parser = require('xml2json');
1ceb3f0e
var xml = "<foo>bar</foo>";
440a652d
var json = parser.toJson(xml); //returns an string by default
6a202d68
console.log(json); ```
caecce8e
if you want to get the Javascript object then you might want to invoke parser.toJson(xml, true);
440a652d
6a202d68
## License Copyright 2011 BugLabs Inc. All rights reserved.