Table of Contents

Class XPathDocumentFactory

Namespace
Cuemon.Xml.XPath
Assembly
Cuemon.Xml.dll

Provides access to factory methods for creating and configuring System.Xml.XPath.IXPathNavigable instances.

public static class XPathDocumentFactory
Inheritance
Object
XPathDocumentFactory

Methods

CreateDocument(Stream, Boolean)

Creates and returns an instance of System.Xml.XPath.XPathDocument from the specified stream.

public static XPathDocument CreateDocument(Stream stream, bool leaveOpen = false)

Parameters

stream Stream

The System.IO.Stream to convert.

leaveOpen Boolean

if true, the source System.IO.Stream is being left open; otherwise it is being closed and disposed.

Returns

XPathDocument

An System.Xml.XPath.XPathDocument initialized with the XML provided by stream.

Exceptions

System.ArgumentNullException

stream cannot be null.

CreateDocument(String)

Creates and returns an instance of System.Xml.XPath.XPathDocument from the specified value.

public static XPathDocument CreateDocument(string value)

Parameters

value String

The System.String to convert.

Returns

XPathDocument

An System.Xml.XPath.XPathDocument initialized with the XML provided by value.

Exceptions

System.ArgumentNullException

value cannot be null.

CreateDocument(String, Encoding)

Creates and returns an instance of System.Xml.XPath.XPathDocument from the specified value.

public static XPathDocument CreateDocument(string value, Encoding encoding)

Parameters

value String

The System.String to convert.

encoding Encoding

The preferred System.Text.Encoding to use in the conversion.

Returns

XPathDocument

An System.Xml.XPath.XPathDocument initialized with the XML provided by value.

Exceptions

System.ArgumentNullException

value cannot be null -or- encoding cannot be null.

CreateDocument(Uri)

Creates and returns an instance of System.Xml.XPath.XPathDocument from the specified uriLocation.

public static XPathDocument CreateDocument(Uri uriLocation)

Parameters

uriLocation Uri

The System.Uri to convert.

Returns

XPathDocument

An System.Xml.XPath.XPathDocument initialized with the XML provided by uriLocation.

Exceptions

System.ArgumentNullException

uriLocation cannot be null.

CreateDocument(XmlReader)

Creates and returns an instance of System.Xml.XPath.XPathDocument from the specified reader.

public static XPathDocument CreateDocument(XmlReader reader)

Parameters

reader XmlReader

The System.Xml.XmlReader to convert.

Returns

XPathDocument

An System.Xml.XPath.XPathDocument initialized with the XML provided by reader.

Exceptions

System.ArgumentNullException

reader cannot be null.