XQuery.Compile Method (Uri, Stream, XQuerySettings)XQuery.Compile Method (Uri, Stream, XQuerySettings)XQuery::Compile Method (Uri^, Stream^, XQuerySettings^)

Loads and compiles the specified XQuery program and returns an XQueryXQueryXQuery object that represents the XQuery program. The specified static context settings are used.

Syntax

Public Shared Function Compile( _
    source As Uri, _
    stream As System.IO.Stream, _
    settings As XQuerySettings _
) As XQuery
public static XQuery Compile(
    Uri source,
    System.IO.Stream stream,
    XQuerySettings settings
)
public:
static XQuery^ Compile(
    Uri^ source, 
    System.IO::Stream^ stream, 
    XQuerySettings^ settings
)
 

Parameters

source

Type: System.UriSystem.UriSystem::Uri^

The base URI of the query.

stream

Type: System.IO.StreamSystem.IO.StreamSystem.IO::Stream^

The StreamStreamStream from which to read the XQuery 1.0 expression.

settings

Type: XmlPrime.XQuerySettingsXmlPrime.XQuerySettingsXmlPrime::XQuerySettings^

The initial static context settings.

Exceptions

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

Remarks

If it is not null a null reference (Nothing in Visual Basic) nullptr, the source parameter is used as the base URI of the query if the query does not include a base-uri declaration.