Skip to main content
Inspiring
June 1, 2007
Answered

How to traverse an XML document?

  • June 1, 2007
  • 1 reply
  • 343 views
I'm trying to use an XML document to qualify conditional text IDs that may be assigned to a section of text. To do that I need to read the child nodes for a given parent node in the XML, and assign those child node values to an array.

The DW8 document API does not appear to support such JavaScript XML DOM functions as loadXMLDoc(), nor do functions like dom.getSelectedNode() support xpath expressions. The childNodes object pertains only to the immediate children of the document object, and does not behave properly as xmlDOM.getElementsByTagName("TopicSku").childNodes.

How do I traverse an XML document using the DW8 extension API?

Thanks,

-Scott
This topic has been closed for replies.
Correct answer srowe3
Oh, wait. I wasn't using getElementsByTagName("TopicSku").childNodes correctly. It works with xmlDOM.getElementsByTagName("TopicSku")[iter].childNodes. I'm back on track again.
-Scott

1 reply

srowe3AuthorCorrect answer
Inspiring
June 6, 2007
Oh, wait. I wasn't using getElementsByTagName("TopicSku").childNodes correctly. It works with xmlDOM.getElementsByTagName("TopicSku")[iter].childNodes. I'm back on track again.
-Scott