If you're using .NET 2.0, try XmlReader
and its subclasses XmlTextReader
, and XmlValidatingReader
. They provide a fast, lightweight (memory usage, etc.), forward-only way to parse an XML file.
If you need XPath capabilities, try the XPathNavigator
. If you need the entire document in memory try XmlDocument
.