Click here to Skip to main content
15,746,110 members
Please Sign up or sign in to vote.
3.22/5 (3 votes)
See more:
could you help me reading XML file using
my XML file looks like :
<This is SAHR Document created on:>
07/05/2013 01:41:25 ص

i want to retrive the value of X_coordinate in a variable and so the value of Y_coordinate and layer
if any one has an idea please help .

1 solution

You have everything you need in .NET FCL. This is my short overview of the ways to parse XML:

  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.
  2. Use the class System.Xml.XmlTextReader; this is the fastest way of reading, especially is you need to skip some data.
  3. Use the class System.Xml.Linq.XDocument; this is the most adequate way similar to that of XmlDocument, supporting LINQ to XML Programming.

Share this answer
Kenneth Haugland 7-May-13 14:58pm    
Oh yes, 5'ed. :-)
Sergey Alexandrovich Kryukov 7-May-13 15:01pm    
Thank you, Kenneth.

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