Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Removing child nodes via XSLT or Xpath - newbie question >Thread Next - Re: Removing child nodes via XSLT or Xpath - newbie question Re: Removing child nodes via XSLT or Xpath - newbie questionTo: NULL Date: 10/3/2005 5:15:00 PM jhoge123@y... wrote: > What I want to do is populate a menu with all category nodes, but > remove all of the product nodes. I tried using "/root/category" as an > xpath, but that selects teh entire category node, along with the > product child nodes that I don't want. > > Do I need to use XSLT first to remove the unwanted nodes? XPath indeed does not change the structure at all, it simply selects a node set in the original document and you can't exclude any child nodes of the selected nodes. Therefore if you want to alter the structure and for instance remove nodes you need to use XSLT (or DOM). -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
