In Titanium Ti.XML.parseString is Undefined Why?

i have a problem with parseString i get the following error :

TypeError : cannot call method "parseString" of undefined.

I just have a XML file, look at this :

var setupXml = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory + "/config.xml"); 
var fluxXml = setupXml.read().text; 
var doc = Ti.XML.parseString(fluxXml); 
myNodeList = doc.documentElement.getElementsByTagName("configuration"); 
for(var i = 0; i < myNodeList.length; i++) {     
  alert(myNodeList.item(i).getElementsByTagName("login").text); 
}

Upvotes: 0

Views: 1041

Answers (1)

kenny.sun
kenny.sun

Reputation: 11

Just delete the "/" at the beginning of "/config.xml"

Upvotes: 1

Related Questions