Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xpath to select all nodes under document root

From: "Joe Fawcett" <joefawcett@---------.------>
To: NULL
Date: 10/2/2007 10:59:00 PM

/*/Category assuming Category elements are children of the document element

or

/*/* selects the child elements of the document element

or

//Category is an inefficient search but grabs any category element, whatever 
level it is.

-- 

Joe Fawcett (MVP - XML)

http://joe.fawcett.name


"eggie5" <eggie5@g...> wrote in message 
news:1191351957.976115.230660@y......
> All I want to do is select all the nodes under the docment root. e.g:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Categories>
>  <Category>
>    <content_provider_id type="integer">1</content_provider_id>
>    <id type="integer">2</id>
>    <name>Traffic Alerts</name>
>  </Category>
>  <Category>
>    <content_provider_id type="integer">1</content_provider_id>
>    <id type="integer">1</id>
>    <name>News Alerts</name>
>  </Category>
>  <Category>
>    <content_provider_id type="integer">1</content_provider_id>
>    <id type="integer">3</id>
>    <name>testing category</name>
>  </Category>
> </Categories>
>
>
> What xpath would return all the Category nodes? But I don't want it to
> be specific to this xml file
> 




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