The reason I am trying to do the wildcard search is because I have nodes
of the same name at different levels and I need them all. So giving a
specific path wouldn't give me all of the nodes I need.

   That's not what your select says, the * wildcard only selectes children.

/*/item = select all "item" nodes which are one level below the root (grandchildren of the context node). //item = select all "item" nodes on any level of the document (all descendants of the context node).

Yes * and / are mathematical operators but in the context of a xpath
search they are used as you expect if you were doing a regex search...
which also supports the * and /

If you read the W3C spec, they specifically mention this ambiguity and the problems that can arise. It is a known issue with wildcards in XPath, and you should not expect it to behave the same way as any particular implementation of RegEx.

What I am attempting to do is get all the node nodes by doing
r = XPathAPI.selectNodeList(myXML,"/*/node");

   What you want is:

r = XPathAPI.selectNodeList(myXML,"//node");

ryanm

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to