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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to