Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Removing child nodes via XSLT or Xpath - newbie question

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent