co-xml2js
v1.0.0
Published
node-xml2js with co
Downloads
9
Readme
co-node-xml2js
node-xml2js with co
Usage
install from npm
npm install co-xml2js
import xml2js from "xml2js";
import co from "co";
co(function *() {
var xml = new xml2js.Builder().buildObject({
xml: {
div: "text"
}
});
var json;
// parse xml
json = yield xml2js.parseString(xml);
// or
var parser = new xml2js.Parser(/*your options*/);
json = yield parser.parseString(xml);
});