Created
December 14, 2011 00:26
-
-
Save mauropm/1474613 to your computer and use it in GitHub Desktop.
Testing XML Parsing of attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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