Can someone show an example of how to read an XML file into an XMLDocument object?

  • Thread starter Thread starter chance
  • Start date Start date
erm, what did you try? anything? Sounds oddly like homework, but...

XmlDocument doc = new XmlDocument;
doc.Load(@"C:\\XMLFile1.xml");

Marc
 
I just realised that you were the OP from the other recent basic xml
question. Don't get me wrong: a lot of people here *are* here
precisely to help people out when they get stuck, but as a matter of
courtesy could you at least *try something* first, and then let us
know where you get stuck? For instance, how about the following:

http://www.google.com/search?hl=en&q=c#+how+to+read+an+XML+file+int...

</rant>

Marc

sorry i was a bit tired and just realized i had another variable named
doc so that's why i was confused and = didn't catch that method...i'll
be more careful next time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top