I have xml file like <project id="1">
<title> Wimbledon</title></project> now i want to read title of project having id=1 .How can i do this??
2 Answers
Accepted Answer
hi Lokesh,
try this
var txt = '<project id="1"><title> Wimbledon</title></project>'; var d = Ti.XML.parseString(txt); var doc = d.getElementsByTagName('project'); if(doc.item(0).getAttribute('id') == 1) { alert(doc.item(0).getElementsByTagName('title').item(0).text); }
Hi Lokesh, you ´can use the XML-Lib: http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.XML
Your Answer
Think you can help? Login to answer this question!