Skip to main content
Inspiring
Jun 1, 2007 8:09 PM UTC
Answered

How to traverse an XML document?

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 is closed to new replies. Start a new post to keep the conversation going.
srowe3Correct answer
Inspiring
Jun 6, 2007 5:53 PM UTC
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
Jun 6, 2007 5:53 PM UTC
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
Translate