Do an xml search for the attribute with XPath.. xmlSearch(xmlDocObject, "Pages/[EMAIL PROTECTED]'2']");
Or Iterate through the node to find "id=2" Joe Eugene > -----Original Message----- > From: Brad Roberts [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 10, 2003 8:15 PM > To: CF-Talk > Subject: XML Question > > > Give the following XML, how can I get the full path to a given element? > > <pages> > <page id="1" name="Home Page"> > <page id="2" name="Products"> > <page id="5" name="ColdFusion"/> > <page id="6" name="Dreamweaver"/> > <page id="7" name="Flash"/> > </page> > <page id="3" name="Support"> > <page id="4" name="FAQ"/> > </page> > </page> > </pages> > > Let's say I want to add a child element under page "2", but I don't know > where 2 falls in the xml object. All I know is I want to insert a child > under the page with ID "2". > > Any ideas? > > Thanks, > > Brad > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm