Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

AddEventListener to XML Parsing

Hi there!

I am a newbie here just a few days ago started to work with Titanium Developer. Please help me in the follolwing issue:

I would attach an eventlistener to xml loading 'start' and 'complete'. How can i do that?

This is my XML parser code here:

this.xml = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'test.xml');
this.xmltext = this.xml.read().text;
this.xmldoc = Ti.XML.parseString(this.xmltext).documentElement;
this.xmlitems = this.xmldoc.getElementsByTagName("member");

Thanks in advance!
Zoltan

— asked August 26th 2010 by Zoltan Radics
0 Comments

1 Answer

  • No, filesystem has no event properties. Reading local file is fairly fast, i never ran into any issue at all, is there anything you wish to do specifically?

    — answered August 26th 2010 by Daniel Lim
    permalink
    1 Comment
    • Thanks Daniel! It was a general question as i am new in Titanium. Later i think i would attach eventListener to load remote XML.

      — commented August 27th 2010 by Zoltan Radics
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.