0 Replies Latest reply on Nov 12, 2006 7:31 AM by Newsgroup_User

    XML Parsing Question

    Level 7
      I have an XML feed I am trying to parse and having problems as I am
      relatively new to Director. The problem is that the feed does not always
      contain information for a particular node so it looks like this sometimes:
      <myFeedInfo>Information Here</myFeedInfo>
      and other times it is just like this:

      Parsing it the first time using:
      put gParserObject.child[1].child[1].child[1].child[1].child[1].text
      works great and gives me the text of that node.

      However, if there is nothing in that node, it gives me an error message. Is
      there a way to check for this instead of getting the error message and
      having the projector crash? Also, like an atribute where you can get the
      value of a particular attribute like this:
      put gParserObject.child[1].child[1].attributeValue["total_results"]

      Is there a way to get information for a particular NODE?

      Any guidence would be greatly appreciated!!