DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008

    Question read/write data to an XML file..???

    Hi to all....

    How do I read and write data to an XML file???

    thanks for any reply....
    alcohol/drug addiction rehab and psychological disorder treatment.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    From what?

  3. #3
    Join Date
    Dec 2007
    Hi Oliver
    The System.XML namespace defines XMLReader and XMLWriter classes. See http://msdn2.microsoft.com/en-us/lib...er(VS.80).aspx
    XML is fundamentally just plain text with a bunch of tags, much like XML.
    If you want, you can treat a .xml file just like a text file, opening it StreamReader and writing with StreamWriter, for example. If all you need is to extract a few key strings from a file, this works well and can be a bit faster if the document is large. I wouldn't generally try to write an xml file as a text file, though; I'd use something from System.XML to make sure the document structure doesn't get broken.
    Stephen Lowe
    disclaimer: Though I work for Microsoft as an Architect\Developer Evangelist, my opinions (and occasional errors) are my own.

Similar Threads

  1. create xml file from dataset
    By shoham78 in forum .NET
    Replies: 2
    Last Post: 04-23-2008, 05:30 AM
  2. web service to store data in XML file
    By raewyn in forum XML
    Replies: 1
    Last Post: 11-28-2005, 04:07 PM
  3. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM
  4. Ado using Data Link File Question
    By KENHOW in forum VB Classic
    Replies: 0
    Last Post: 07-13-2001, 04:02 PM
  5. Replies: 0
    Last Post: 06-19-2001, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.