Skip to main content
Inspiring
March 3, 2009
Question

That specific XML node...

  • March 3, 2009
  • 2 replies
  • 470 views
Hi
I have an ID document (CS3 - MAC - JavaScript) with a complex XML structure (about 700 nodes...).
I need to get the attributes of a specific node without making FOR statements because it takes a long time.
Basically every node in the XML structure has 5 attributes.
One of those is the ID.
Is it possible to get the node knowing the ID value?
Thanks anticipately.
This topic has been closed for replies.

2 replies

Peter Kahrel
Community Expert
Community Expert
March 3, 2009
Here's an example:

http://www.adobeforums.com/webx/.59b7651b/10

Peter
Known Participant
March 3, 2009
> Is it possible to get the node knowing the ID value?

Take a look at the XML.xpath() method. That's it's purpose. The version in
Adobe's interpreters will choke on more complicated expressions, but looking for
nodes with a particular attributes should be something it can handle.