Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: search xml node by attribute in xmlnode[] array

From: "Joe Fawcett" <joefawcett@---------.------>
To: 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 



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