Skip to content

Instantly share code, notes, and snippets.

@hbi99
Last active January 1, 2016 04:28
Show Gist options
  • Save hbi99/8091655 to your computer and use it in GitHub Desktop.
Save hbi99/8091655 to your computer and use it in GitHub Desktop.
var str = '<data><brand>Sony</brand><brand>Apple</brand>'+
'<brand>Panasonic</brand></data>',
doc = Defiant.xmlFromString(str),
node = Defiant.node.selectSingleNode(doc, '//brand');
console.log( Defiant.node.prettyPrint( node ) );
// '<brand>Sony</brand>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment