Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Does Node Exist - XML Parsing
Old 06-03-2008, 11:18 AM Does Node Exist - XML Parsing
Average Talker

Posts: 28
Trades: 0
I am having problems checking if a node exists.

This works if the node does exist, craps out if it doesn't:
if(transport.responseXML.getElementsByTagName('Des cription')[0].firstChild)

This returns undefined regardless if it exists or not:
if(transport.responseXML.getElementsByTagName('Des cription').firstChild)


This returns an Object HTMLCollection regardless if it exists or not:
if(transport.responseXML.getElementsByTagName('Des cription'))


I'm sure it's a simple solution. Any hints?

Thanks,
Cory
Cory Dee is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Does Node Exist - XML Parsing
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35357 seconds with 12 queries