Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends,

I Have a problem while reading the values from XML to C#

Here is my xml file i want to retrieve each row.
XML
<rows>
  <row id="r1" number="1" c1="715763" c2="PAID" c3="2013-09-13" c4="Followup" />
  <row id="r2" number="2" c1="719679" c2="PAID" c3="2013-09-01" c4="Followup" />
  <row id="r3" number="3" c1="749760" c2="PAID" c3="2013-09-05" c4="Followup" />
</rows>




can u any one help me?


Thanks and Regards
Rushi
Posted
Comments
Sergey Alexandrovich Kryukov 1-Sep-13 2:23am    
What's wrong with just reading MSDN documentation?
—SA

There are different methods of XML parsing readily available from .NET FCL. This is my short overview of them:

  1. Use System.Xml.XmlDocument class. It implements DOM interface; this way is the easiest and good enough if the size if the document is not too big.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx[^].
  2. Use the class System.Xml.XmlTextReader; this is the fastest way of reading, especially is you need to skip some data.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx[^].
  3. Use the class System.Xml.Linq.XDocument; this is the most adequate way similar to that of XmlDocument, supporting LINQ to XML Programming.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx[^], http://msdn.microsoft.com/en-us/library/bb387063.aspx[^].


Good luck,
—SA
 
Share this answer
 
Comments
Joezer BH 1-Sep-13 8:03am    
5ed!
Sergey Alexandrovich Kryukov 1-Sep-13 10:53am    
Thank you.
—SA
 
Share this answer
 
Comments
Joezer BH 1-Sep-13 8:03am    
5ed!
ridoy 1-Sep-13 8:17am    
Thank you,:)
Reading an xml using xmldocument c#[^]

my be this link will help u if you can get plz specify your condition i will help u
 
Share this answer
 
v3
Comments
Nelek 1-Sep-13 18:55pm    
If you want to be taken seriously you should not write with sms-chat shortcuts. It looks not so much professional

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900