Author: yukiar | Posted on: 6/23/2008 8:56:47 PM | Views : 492

 Hi, I am using Silverlight 2.0 beta 2 with C#.
I am trying to perse a xml file and pick up  elements in the xml. I am using Xml.Reader.ReadToFollowing(string elementname) method to pick up elements one by one, like following codes.
------------sample xml file-------------------------
< ? xml version="1.0"?>
<data><a>test a</a><b>test b</b><c>test c</c><d>test d</d>...</data>
-----------------------------------------------------------
------------------------codes--------------------------
 XmlReader reader2 = XmlReader.Create(new StringReader(xmlstring));

            reader2.ReadToFollowing("a");
           /*add the content obtained by reader2.ReadElementContentAsString(); into List*/
        ...

Go to the complete details ...