XMLReader.Read() is strange behaviour when I try to parse XML using the XmlReader object. It usually skips the record and move the pointer to next level of element while loop through the elements. The code which I used to find each child records.
This is the sample xml file.
The code which I used to find each child records as detailed below.
When you call ReadOuterXml() method this would consume the complete xml and point the cursor to just before the next element.
In my example the cursor will pint to
element of Order ID=2 record. Hence it never satisfies the
condition to fetch Record 2.
You can reach me @ raj.webjunky@Yahoo.com
No comments:
Post a Comment