XQuery.Compile Method (Uri, string)XQuery.Compile Method (Uri, String)XQuery::Compile Method (Uri^, String^)
- XmlPrime 2.8
- Other Versions ▼
Compiles the specified XQuery program and returns an XQueryXQueryXQuery object that represents the XQuery program.
Default static context settings are used.
Parameters
- source
Type: System.UriSystem.UriSystem::Uri^
The base URI of the query.
- query
Type: System.StringSystem.StringSystem::String^
An XQuery expression.
Return Value
Type: XmlPrime.XQueryXmlPrime.XQueryXmlPrime::XQuery^
An XQueryXQueryXQuery object, or null
a null reference (Nothing
in Visual Basic)
nullptr
if an unrecoverable error was raised and handled
by a subscriber to CompilationErrorCompilationErrorCompilationError
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException |
query is null
a null reference (Nothing in Visual Basic)
nullptr .
|
XdmExceptionXdmExceptionXdmException | An error occurred compiling the query. |
Remarks
Any errors or warnings encountered during compilation raise the CompilationErrorCompilationErrorCompilationError event. If nothing subscribes to this event then an XdmExceptionXdmExceptionXdmException is thrown if an unrecoverable error is encountered. If this event is subscribed to then the exception is not thrown, and this method returnsnull
a null reference (Nothing
in Visual Basic)
nullptr
instead.
The source parameter is used as the base URI of the query if the query does
not include a base-uri
declaration.