Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mlooney/b9c489ee01b7f3fd3102f2efa31313a9 to your computer and use it in GitHub Desktop.
Save mlooney/b9c489ee01b7f3fd3102f2efa31313a9 to your computer and use it in GitHub Desktop.
import util from 'util'
import xml4js from 'xml4js'
let xml = `<?xml version="1.0"?> <Element xmlns:xsi="x" xsi:noNamespaceSchemaLocation="y"> </Element>`
let result = xml4js.parseString(xml, {}, (err, result) => {
if (err) {
console.log("error: "+util.inspect(err))
} else {
console.log("success: "+ util.inspect(result, false, null))
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment