Titanium - xml attribute find and replace

toto06

New Member
I am working in Titanium mobile and im trying to parse and xml feed. The feed parses fine, but I am looking for exact attributes such as title, author, and description. But every so often, the feed will not be supplied with one of the items im looking for. For instance, title and description will be present in the item, but author will be missing because there was never one supplied. Example \[code\]<item> <title></title> <author></author> <desc></desc><item><item> <title></title> <desc></desc><item>\[/code\]Notice that author is missing in the second item. My code will error out with "Result of expression "author".item(0)'[null] is not an object."How do i skip that attribute if it doesn't exist?
 
Back
Top