Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Display related Nodes

From: "Joe Fawcett" <joefawcett@----------.------>
To: NULL
Date: 5/1/2005 9:57:00 AM
"DNKMCA" <dnk@m...> wrote in message 
news:elpxbrGTFHA.616@T......
> Dear all,
>
> i have a xml like
>
> ------------------------------------------------
> <main>
>    <entry>
>        <name>John</name>
>        <addressList>
>       <address>
>            <address1>120, HA Extn</address1>
>            <city>NY</city>
>       </address>
>       <address>
>            <address1>320 , Wellington Avenue</address1>
>            <city>WS</city>
>       </address>
>    </entry>
>    <entry>
>        <name>John</name>
>        <addressList>
>           <address>
>                <address1>88, South END</address1>
>                <city>NY</city>
>           </address>
>           <address>
>                <address1>J Garden</address1>
>                <city>NY</city>
>           </address>
>    </entry>
> </main>
>
> ------------------------------------------------
>
> When i search for city for NY (using DOM) then im getting only 3 nodes
> where ever <city> is there. not the other nodes in the set.
> How do i take the other node details includeing the name
>
> For ex. when i search for  -- entry/addressList/address/city='NY' --
> how do i print name,addressList for the related search result.
>
> How to achieve this.
>
> Thankx in advance,
> DNK
>

Your XPath should be:
entry[addressList/address/city='NY']

-- 

Joe (MVP - XML)

https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5




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