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

Compiles an XPath expression and returns a XPathXPathXPath object that represents the expression with the specified in-scope namespaces.

Syntax

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

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.

namespaces

Type: System.Xml.IXmlNamespaceResolverSystem.Xml.IXmlNamespaceResolverSystem.Xml::IXmlNamespaceResolver^

The in scope namespaces for the 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.