Creating an XQuery Procedure
This topic describes how to create an XQuery procedure.
To create an XQuery procedure
|
1.
|
Select a folder in the Studio resource tree, and then right-click and select New XQuery Procedure, or select File > New > XQuery Procedure. |
|
2.
|
Supply a name for the procedure in the XQuery. |
|
3.
|
Type a name and click OK. |
The editor opens in the XQuery panel on the right.
|
4.
|
Use the XQuery panel to formulate and edit the XQuery XML script: |
|
—
|
You can use any non-declarative statement as the first statement after BEGIN. |
|
—
|
If you have a script stored in your file system, you can upload it using the Insert from File button. |
|
—
|
The XQuery panel can highlight XML syntax elements (comments, keywords, and so on). |
|
—
|
Insert standard XML comments by highlighting one or more lines and typing: |
|
—
|
Ctrl-Hyphen to insert two dashes (--) at the start of each line. |
For details on executing an XQuery procedure, see Executing a Procedure or Parameterized Query.