XQuery.Compile Method (FileStream, XQuerySettings)XQuery.Compile Method (FileStream, XQuerySettings)XQuery::Compile Method (FileStream^, 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( _
    stream As System.IO.FileStream, _
    settings As XQuerySettings _
) As XQuery
public static XQuery Compile(
    System.IO.FileStream stream,
    XQuerySettings settings
)
public:
static XQuery^ Compile(
    System.IO::FileStream^ stream, 
    XQuerySettings^ settings
)
 

Parameters

stream

Type: System.IO.FileStreamSystem.IO.FileStreamSystem.IO::FileStream^

The stream from which to read the XQuery 1.0 program.

settings

Type: XmlPrime.XQuerySettingsXmlPrime.XQuerySettingsXmlPrime::XQuerySettings^

The initial static context settings.

Exceptions

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

Remarks

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