If you can get away with just reading through the document forwards
only, you can use an XmlReader. This doesn't load the document at all,
and so has the smallest memory footprint. It's also quick.

Otherwise you're on the right track with XPathDocument and
XPathNavigator. These classes are pretty fast and lightweight compared
to the full XmlDocument and is associated classes.

HTH,
G.

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Luis Abreu
Sent: 26 May 2002 21:32
To: [EMAIL PROTECTED]
Subject: XML question


sorry...forgot to change the subject...
 Hello again.
 Sorry to ask this basic question, but here it goes. what's the best way
to read an
 xml file and navigate through all the nodes (here best way means
 more quickly and using the least memory possible)?

 Currently I'm using XPathDocument and XPathNavigator. Is this the best
 way of doing this?

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to