Local xml parsing

You must Login before you can answer or comment on any questions.

Hello Sir, In my Home Screen I have start button when i start button is pressed i handled these actions to parse the local xml values

the following codings are attached:

var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'XMLs/World_History_1_Subject.xml'); var xmltext = f.read().text; var doc = Ti.XML.parseString(xmltext).documentElement; var itemList = doc.getElementsByTagName("chapter");

//var itemstext = doc.getElementsByTagName("chapterName").text; var itemstext=doc.getElementsByTagName("chapterName").item(0).text;

Ti.API.info('found '+itemList.length+' items in the RSS feed');

Ti.API.info('found '+itemstext+' itemstext in the RSS feed');

at the run time the error shows is:

cannot call method "parseString" of undefined

1 Answer

Prasanna, it's not good etiquette to double-post in this forum. I have answered your question here.

Thanks

Your Answer

Think you can help? Login to answer this question!