House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

XPath Help

Author:
Tony Pimm
05/21/2004 07:04 AM

Hi, I'm trying to get some XPath to work with respect to a navigation tree. <?xml version="1.0" encoding="utf-8" ?> <tree>   <node objectid="3456" title="Informationa">     <node objectid="2134" title="Contact" />     <node objectid="5656" title="Top 1.2" />     <node objectid="5672" title="Top 1.3" />     <node objectid="123" title="Top 1.4" />     <node objectid="8357" title="Top 1.5" />   </node>   <node objectid="9834" title="Banks" circuit="banks" />   <node objectid="2245" title="Corporates" circuit="corporates">     <node objectid="45688" title="Top 3.1" />     <node objectid="9567" title="Top 3.2" />     <node objectid="4633" title="Top 3.3" />   </node>   <node objectid="1554" title="Managers" />   <node objectid="6734" title="Library" /> </tree> I can use Xpath to return all the child nodes within a node using //node[@objectid="3"] However, how can I do this in reverse?  How can I retrieve the node that is the parent of a particular node?  How can I get the objectid of the parent of 2134? Any help you could share would be great! Thanks Tony


Search cf-talk

June 19, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference