Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - search xml node by attribute in xmlnode[] array [Thread Next] Re: search xml node by attribute in xmlnode[] arrayTo: NULL Date: 12/24/2008 10:06:00 AM "nagu" <coolnags@g...> wrote in message news:b70da72daefd433ea47f7e0d53d5e7ce@n...... > I have a xmlnode[] array which i m getting by deserializing a xml response > with XmlAnyElement attribute. It has a namespace in it without name table. > The response looks like below. I need th find the value "abc" based on the > attribute name="rs" . > > <root> > <top> > <inner> > <Field name="rs">abc</Field> > <Field name="ab">xyz</Field> > </inner> > <inner> > <Field name="rs">abc</Field> > <Field name="ab">xyz</Field> > </inner> > </top> > </root> > > > Regards, > Nags > > url:http://www.ureader.com/gp/1624-1.aspx I don't understand what you mean by "It has a namespace in it without name table". The XPath to retrieve the nodes required from the above sample is: /root/top/inner/Field[@name = 'rs] to find the Field elements or /root/top/inner/Field[@name = 'rs]/text() to get the text value, which one you need exactly depends on how you use the results. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
