Working with XML Documents

To be fully accessible, an XML document must be entirely loaded in memory and its nodes and attributes mapped to relative objects derived from the Xml­Node class. The process that builds the XML DOM triggers when you call the Load method. You can use a variety of sources to indicate the XML document to work on, including disk files and URLs and also streams and text readers.

Loading XML Documents

The Load method always transforms the data source into an XmlTextReader object and passes it down to an internal loader object, as shown here:

public virtual void Load(Stream);
public virtual void Load(string);
public virtual void Load(TextReader);
public virtual void Load(XmlReader);

The loader is responsible for reading ...

Get Applied XML Programming for Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.