Permalink
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (41 sloc) 3.58 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs ms.assetid caps.latest.revision author ms.author manager
Process XML Data Using the XPath Data Model
03/30/2017
.net
dotnet-standard
article
VB
CSharp
C++
jsharp
536c6fce-1453-4654-9c72-bca54d47e081
2
mairaw
mairaw
wpickett

Process XML Data Using the XPath Data Model

The xref:System.Xml?displayProperty=nameWithType namespace provides a programmatic representation of XML documents, fragments, nodes, or node-sets in-memory, using the xref:System.Xml.XmlDocument or xref:System.Xml.XPath.XPathDocument classes.

The xref:System.Xml.XPath.XPathDocument class provides a fast, read-only, in-memory representation of an XML document using the XPath data model. The xref:System.Xml.XmlDocument class provides an editable in-memory representation of an XML document implementing W3C Document Object Model (DOM) Level 1 Core and Core DOM Level 2. Both classes implement the xref:System.Xml.XPath.IXPathNavigable interface and return an xref:System.Xml.XPath.XPathNavigator object used to select, evaluate, navigate, and in some cases, edit the underlying XML data.

The following sections describe the functionality of the xref:System.Xml.XPath.XPathNavigator class based on the class that returns it.

In This Section

Reading XML Data using XPathDocument and XmlDocument
Describes how to create a read-only xref:System.Xml.XPath.XPathDocument class object to read an XML document and how to create an editable xref:System.Xml.XmlDocument class object to read and edit an XML document. This topic also describes how return an xref:System.Xml.XPath.XPathNavigator object from each class to navigate and edit an XML document.

Selecting, Evaluating and Matching XML Data using XPathNavigator
Describes the methods of the xref:System.Xml.XPath.XPathNavigator class used to select nodes in an xref:System.Xml.XPath.XPathDocument or xref:System.Xml.XmlDocument object using an XPath query, evaluate and examine the results of an XPath expression, and determine if a node in an XML document matches a given XPath expression.

Accessing XML Data using XPathNavigator
Describes the methods of the xref:System.Xml.XPath.XPathNavigator class used to navigate nodes, extract XML data and access strongly typed XML data in an xref:System.Xml.XPath.XPathDocument or xref:System.Xml.XmlDocument object.

Editing XML Data using XPathNavigator
Describes the methods of the xref:System.Xml.XPath.XPathNavigator class used to insert, modify and remove nodes and values from an XML document contained in an xref:System.Xml.XmlDocument object.

Schema Validation using XPathNavigator
Describes the ways to validate the XML content contained in an xref:System.Xml.XPath.XPathDocument or xref:System.Xml.XmlDocument object.

See Also

xref:System.Xml.XmlDocument
xref:System.Xml.XPath.XPathDocument
xref:System.Xml.XPath.XPathNavigator
Process XML Data Using the DOM Model