Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi......to all

first of all how to write the xml file,and that file is saved in required folder
exp:G:\lokesh\asp.net\sample1.xml
and
how to read the xml file and displayed in list box

replay me with clear example please...

please ant any one help to me
Posted
Updated 8-Aug-12 8:05am
v2
Comments
Sergey Alexandrovich Kryukov 8-Aug-12 13:46pm    
Ever read MSDN documentation?
--SA

This is my short overview of the classes available in .NET:

  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 classes System.Xml.XmlTextWriter and 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.xmlwriter.aspx[^], 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[^].


Use whatever is more suitable for your task.

The rest of it is described here: Microsoft Q209354

—SA
 
Share this answer
 
v2
Comments
Monjurul Habib 8-Aug-12 13:58pm    
5!
Sergey Alexandrovich Kryukov 8-Aug-12 14:25pm    
Thank you, Monjurul.
--SA
 
Share this answer
 
Comments
Christian Amado 8-Aug-12 14:31pm    
Nice link! =)
santosh_k 8-Aug-12 14:32pm    
thanks
santosh_k 8-Aug-12 14:32pm    
http://www.csharpcorner.com/uploadfile/mahesh/readwritexmltutmellli2111282005041517am/readwritexmltutmellli21.aspx
please go through this link it will give u xml class concept and xml uses..

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