Was this helpful?
XQuery Invoker
XQuery Invoker extracts data from an XML document based on the XQuery expression. You must have working knowledge of XML and XQuery.
Actian DataConnect supports XQuery Invoker 1.1 and 1.2 versions.
The XQuery Invoker does the following:
Extracts data from complex XML documents
Accepts dynamic sources, targets, and queries
Supports a static source document, a dynamic XQuery expression, and vice versa
XQuery Invoker Properties
XQuery Invoker 1.1.0 supports two instance properties.
Property
Description
Dynamic XQuery or XML Source Document
Location or URL of XQuery or XML source file
Source XML Document
Location of the source XML document
Supported Actions
Action
Description
Execute
Executes the supported parameters and properties.
Supported Action Parameters
Action
Parameter
Description
Execute
SourceMessage
Name of the source message for the invoker
TargetMessage
Name of the target message for the invoker
XQuery Invoker 1.1.0 Action Properties
In the step property, you can provide a URL to either a source XML document, or an XQuery file by setting the step property value (design time) or as the source DJMessage (run time).
If the input is a source XML file, then the file content can be passed in the source message.
The tables below outline the various possible step property combinations available in XQuery Invoker 1.1.0.
Note:  Source Message is the value supplied within the source DJMessage.
 
XML Source
XQuery Expression
Description
Example
Design Time
URL
URL
Provide URL to the XML source at design time
C:\people.xml
Provide URL to the XQuery file at design time
C:\people.xq
Combination of Design and Run Time
Source Message (URL)
URL
Provide URL to the XML source at run time
srcMsg.Body = "C:\people.xml"
Provide URL to the XQuery file at design time
C:\people.xq
Source Message (Content)
URL
Provide soure XML content at run time
msg.Body = fileread("C:\people.xml")
Provide URL to the XQuery file at design time
C:\people.xq
URL
Source Message (URL)
Provide URL to the XML source at design time
C:\people.xml
Provide URL to the XQuery file at run time
srcMsg.body="C:\people.xq"
URL
Source Message (Content)
Provide URL to the XML source at design time
C:\people.xml
Provide XQuery file at run time
srcMsg.body=fileread("C:\people.xq")
XQuery Invoker 1.2.0 Action Properties
XQuery Invoker 1.2.0 supports the following action properties.
Action
Property
Description
Execute
XML Source
The Execute action accepts inputs:
At design time as a URL
At run time as either content or URL through the DJMessage object
Execute
XQuery Expression
The Execute Action accepts inputs:
At design time as a URL
At run time as either content or URL through the DJMessage object
Errors
This table lists the error conditions that are specific to XQuery Invoker.
Code
Name
Description
Reason
12
ERR_NOSOURCE
Invalid XML source
XML source file provided is corrupt or invalid.
34
ERR_INVALID
Invalid XQuery expression
XQuery expression provided is invalid.
50
ERR_UNSPECIFIED
Run time exception
Run time exception encountered.
Last modified date: 10/22/2024