Udostępnij za pośrednictwem


Parsing XML

The topics in this section describe how to parse XML documents.

In This Section

Topic

Description

How to: Parse a String

Shows how to parse a string to create an XML tree.

How to: Load XML from a File

Shows how to load XML from a URI using the Load method.

Preserving White Space while Loading or Parsing XML

Describes how to control the white space behavior of LINQ to XML while loading XML trees.

How to: Catch Parsing Errors

Shows how to detect badly formed or invalid XML.

How to: Create a Tree from an XmlReader

Shows how to create an XML tree directly from an XmlReader.

How to: Stream XML Fragments from an XmlReader

Shows how to stream XML fragments by using an XmlReader.

When you have to process arbitrarily large XML files, it might not be feasible to load the whole XML tree into memory. Instead, you can stream XML fragments.

See Also

Concepts

Creating XML Trees