XQuery.Compile Method (Uri, string, XmlNameTable)XQuery.Compile Method (Uri, String, XmlNameTable)XQuery::Compile Method (Uri^, String^, XmlNameTable^)

Compiles the specified XQuery program and returns an XQueryXQueryXQuery object that represents the XQuery program. Default static context settings are used.

Syntax

Public Shared Function Compile( _
    source As Uri, _
    query As String, _
    nameTable As System.Xml.XmlNameTable _
) As XQuery
public static XQuery Compile(
    Uri source,
    string query,
    System.Xml.XmlNameTable nameTable
)
public:
static XQuery^ Compile(
    Uri^ source, 
    String^ query, 
    System.Xml::XmlNameTable^ nameTable
)
 

Parameters

source

Type: System.UriSystem.UriSystem::Uri^

The base URI of the query.

query

Type: System.StringSystem.StringSystem::String^

An XQuery 1.0 expression.

nameTable

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

The name table for documents used with this query.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException query or nameTable is null a null reference (Nothing in Visual Basic) nullptr.
XdmExceptionXdmExceptionXdmExceptionAn error occurred compiling the query.

Remarks

The source parameter is used as the base URI of the query if the query does not include a base-uri declaration.