Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Removing child nodes via XSLT or Xpath - newbie question Removing child nodes via XSLT or Xpath - newbie questionTo: NULL Date: 10/3/2005 7:28:00 AM I have an XML document that contains more information than I need for a
particular application. The structure is as follows:
<root>
<category ID = "1">
<product ID="1" />
<product ID="2" />
</category>
<category ID = "2">
<category id ="3">
<product ID ="3"/>
</category>
<category id ="4">
<product ID ="4"/>
</category>
</category>
</root>
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?
Any help would be greatly appreciated.
Thanks,
John
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
