Skip to content

Instantly share code, notes, and snippets.

@mauropm
Created December 14, 2011 00:26
Show Gist options
  • Save mauropm/1474613 to your computer and use it in GitHub Desktop.
Save mauropm/1474613 to your computer and use it in GitHub Desktop.
Testing XML Parsing of attributes
var str = "<test name='appcelerator'/>"
var xml = Ti.XML.parseString(str);
var node = xml.documentElement;
//Ti.API.info("Attributes: "+xml.attributes);
if (node.attributes && (node.attributes.length > 0)) {
Ti.API.info(" Value: "+node.attributes.item(0).nodeValue);
};
win = Ti.UI.createWindow();
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment