The XML functions available in IDS 11 are summarized in the following table:
Function Name | Description |
genxml,genxmlclob | return SQL results as XML elements |
genxmlelem, genxmlelemclob | return column values as XML elements |
genxmlschema,genxmlschemaclob | return schema as XML |
genxmlquery, genxmlqueryclob | return result set as XML |
genxmlqueryhdr, genxmlqueryhdrclob | return result set as XML with head |
extract, extractxmlclob | evaluate XPATH expression |
extractvalue, extractxmlclobvalue | return value of XML node |
existsnode | verify whether a node exists in XML doc |
idsxmlparse | parse XML doc to determine if it is well-formed |
To use the XML functions in IDS 11:
- Start an XML VP by doing one of the following
Add VPCLASS idsxmlvp,num=1 in onconfig file to start the XML VP when the server starts
OR
Use onmode -p +1 idsxmlvp command to add an XML VP dynamically after the server has started
Note: An XML VP is required only if you use XPATH functions such as extract(), extractxmlclob(), extractvalue(),
extractxmlclobvalue(),existsnode(), idsxmlparse(). XML functions starting with gen do not require the XML VP. - Verify that $INFORMIXDIR/lib/libxml.udr is read-only
- Make sure a default sbspace exists.
Default sbspace is specified by the SBSPACENAME configuration parameter. You can check the output of onstat -d to
verify that the space exists.
I will talk about each of the above functions with examples in Part 2.
Suma Vinod[Read More]