Titanium Community Questions & Answer Archive

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

YQL vs XML

I've got a working app on iPhone using YQL queries. Very nice, easy to use data returned from the YQL functions…

but I'm migrating this to android too, and therefor need to find an alternative (standard xhr, I assume) to do it…

I would still like to get my data from the yahoo yql servers, so I'm using the REST version of the YQL query I was using before… and I get the XML data back just fine.

BUT, I'd really like to avoid changing all my display functions that work with that returned data, so I'm wondering if there's a way I can parse/process the this.responseXML data I get from the xhr version to be in exactly the same format/structure as the YQL data I was using before…?

For example, with the YQL object, I could use simple array and dot notation to navigate through the data, (eg. feed[0].entry.author.name) but it looks like (from what I read on these boards) that the only way to deal with XML data is using something like this: doc.getElementsByTagName("entry").item(0).getElementsByTagName("author").item(0)…etc …yuk.
So what format IS the YQL data anyway, and how can I turn the responseXML into it…?
thanks!
David

— asked May 28th 2010 by david hoare
  • parse
  • xml
  • yql
0 Comments

0 Answers

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.