XPath.Compile Method (string, XmlNameTable)XPath.Compile Method (String, XmlNameTable)XPath::Compile Method (String^, XmlNameTable^)

Compiles an XPath expression and returns a XPathXPathXPath object that represents the expression using the default settings.

Syntax

Public Shared Function Compile( _
    expression As String, _
    nameTable As System.Xml.XmlNameTable _
) As XPath
public static XPath Compile(
    string expression,
    System.Xml.XmlNameTable nameTable
)
public:
static XPath^ Compile(
    String^ expression, 
    System.Xml::XmlNameTable^ nameTable
)
 

Parameters

expression

Type: System.StringSystem.StringSystem::String^

An XPath expression.

nameTable

Type: System.Xml.XmlNameTableSystem.Xml.XmlNameTableSystem.Xml::XmlNameTable^

The name table used for documents used with this expression.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException expression or nameTable is null a null reference (Nothing in Visual Basic) nullptr
XdmExceptionXdmExceptionXdmExceptionAn error occurred compiling the expression.
LicenceExceptionLicenceExceptionLicenceExceptionThis version of XmlPrime has expired.