Wednesday, May 2, 2012

having issue in extracting an element from xml

I have a xml like this :



  <?xml version="1.0" encoding="UTF-8"?>
<InsertReceipts>
<receipts xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:string>
<![CDATA[ test]]>
</a:string>
</receipts>
</InsertReceipts>


I want to extract element a:string from this xml,but can't figure out to do this?



as i use XmlElement foo = (XmlElement)doc.SelectSingleNode("//a:string");



it gives a parsing error



Feedback and help appreciated





No comments:

Post a Comment