benbuckman/nodejs-ebay-api — pull request #9 by danielecr (2014-01-31 18:10:37+00:00)
Title: buildXmlInput: usexml2json, trasformToCDATA params

usexml2json activate a modality that parse a json object generated by a legal xml ebay call format PLUS xml2json node package.
transformToCDATA is an optional reguar expression that generate CDATA for string value if matched (es.
options:{params: usexml2json:true, transformToCDATA: /[<>]+/, Item:Item}
will work with:
var parser = require('xml2json');
var json = parser.toJson(xml,{object:true,arrayNotation:true,sanitize:false});
var Item = json.AddItem.Item;
// (Sure, tested!)