Skip to content

Instantly share code, notes, and snippets.

@nancystodd
Last active June 26, 2018 21:44
Show Gist options
  • Save nancystodd/d23e1369961397419a3fd808f3ac2000 to your computer and use it in GitHub Desktop.
Save nancystodd/d23e1369961397419a3fd808f3ac2000 to your computer and use it in GitHub Desktop.
Get nodes from XMLDocument - SN example
var response = s.post();
var xmldoc = new XMLDocument(response, true);
var nodelist = xmldoc.getNodes("//Action/*");
for(var i=0;i<nodelist.getLength();i++){
gs.print(nodelist.item(i).getNodeName() +' : '+nodelist.item(i).getLastChild().getNodeValue()+'\n');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment