J
jhoge123
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
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