class XQueryProcessor (View source)

Methods

XdmValue|null
runQueryToValue()

Compile and evaluate the query. Result returned as an XdmValue object. If there are failures then a null is returned

string|null
runQueryToString()

Compile and evaluate the query. Result returned as string. If there are failures then a null is returned

void
runQueryToFile(string $outfilename)

Compile and evaluate the query. Save the result to file

void
setQueryContent(string $str)

query supplied as a string

void
setQueryItem(XdmItem $item)

No description

void
setQueryFile(string $filename)

query supplied as a file

void
setContextItemFromFile(string $fileName)

Set the initial context item for the query. Supplied as filename

void
setContextItem(XdmValue|XdmItem|XdmNode|XdmAtomicValue $obj)

Set the initial context item for the query.

void
setQueryBaseURI(string $uri)

Set the static base URI for a query expressions compiled using this XQuery Processor. The base URI is part of the static context, and is used to resolve any relative URIS appearing within a query

void
declareNamespace(string $prefix, string $namespace)

Declare a namespace binding as part of the static context for XPath expressions compiled using this XQuery processor

void
setParameter(string $name, XdmValue $value)

Set the parameters required for XQuery Processor

void
setProperty(string $name, string $value)

Set properties for Query.

void
clearParameters()

Clear parameter values set

void
clearProperties()

Clear property values set

void
exceptionClear()

Clear any exception thrown

string
getErrorCode(int $i)

Get the $i'th error code if there are any errors

string
getErrorMessage(int $i)

Get the $i'th error message if there are any errors

int
getExceptionCount()

Get number of error during execution or evaluate of query

Details

XdmValue|null runQueryToValue()

Compile and evaluate the query. Result returned as an XdmValue object. If there are failures then a null is returned

Return Value

XdmValue|null

string|null runQueryToString()

Compile and evaluate the query. Result returned as string. If there are failures then a null is returned

Return Value

string|null

void runQueryToFile(string $outfilename)

Compile and evaluate the query. Save the result to file

Parameters

string $outfilename

Return Value

void

void setQueryContent(string $str)

query supplied as a string

Parameters

string $str

Return Value

void

void setQueryItem(XdmItem $item)

No description

Parameters

XdmItem $item

Return Value

void

void setQueryFile(string $filename)

query supplied as a file

Parameters

string $filename

Return Value

void

void setContextItemFromFile(string $fileName)

Set the initial context item for the query. Supplied as filename

Parameters

string $fileName

Return Value

void

void setContextItem(XdmValue|XdmItem|XdmNode|XdmAtomicValue $obj)

Set the initial context item for the query.

Any one of the objects are accepted: XdmValue}, {@link XdmItem}, {@link XdmNode} and {@link XdmAtomicValue.

Parameters

XdmValue|XdmItem|XdmNode|XdmAtomicValue $obj

Return Value

void

void setQueryBaseURI(string $uri)

Set the static base URI for a query expressions compiled using this XQuery Processor. The base URI is part of the static context, and is used to resolve any relative URIS appearing within a query

Parameters

string $uri

Return Value

void

void declareNamespace(string $prefix, string $namespace)

Declare a namespace binding as part of the static context for XPath expressions compiled using this XQuery processor

Parameters

string $prefix
string $namespace

Return Value

void

void setParameter(string $name, XdmValue $value)

Set the parameters required for XQuery Processor

Parameters

string $name
XdmValue $value

Return Value

void

void setProperty(string $name, string $value)

Set properties for Query.

Parameters

string $name
string $value

Return Value

void

void clearParameters()

Clear parameter values set

Return Value

void

void clearProperties()

Clear property values set

Return Value

void

void exceptionClear()

Clear any exception thrown

Return Value

void

string getErrorCode(int $i)

Get the $i'th error code if there are any errors

Parameters

int $i

Return Value

string

string getErrorMessage(int $i)

Get the $i'th error message if there are any errors

Parameters

int $i

Return Value

string

int getExceptionCount()

Get number of error during execution or evaluate of query

Return Value

int