node-xml2js-expat
Description
Simple XML to JavaScript object converter. Uses node-expat. Install with npm :) See the tests for examples until docs are written. Note: If you're looking for a full DOM parser, you probably want JSDom.
Simple usage
var fs = var xml2js = var parser = ;fs
The Parser object supports the following encodings, that can be specified as the first parameter, in which case the callback should be the second. (Each argument is optional.)
UTF-8
UTF-16
ISO-8859-1
US-ASCII
For example:
var parser = 'UTF-8' {};
or
var parser = 'UTF-8'parserEXPLICIT_CHARKEY = true // Force text nodes to always appear as property.parser
Parser also supports streaming input:
var parser = 'UTF-8';fs