Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Display related Nodes [Thread Next] Re: Display related NodesTo: 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
