Start of change

XDBDECOMPXML

The XDBDECOMPXML procedure extracts values from serialized XML data and populates relational tables with the values.

Authorization

The privileges held by the authorization ID of the statement must include the following:
  • The following system authorities:
    • The system authority *EXECUTE on the XDBDECOMPXML service program associated with the procedure, and
    • The system authority *EXECUTE on the SYSPROC library.
The privileges held by the authorization ID of the statement must include:
  • The INSERT privilege on any tables specified in the annotations, or
  • Administrative authority

Syntax

Read syntax diagramSkip visual syntax diagram
>>-XDBDECOMPXML--(--+-rschema-+--,--name--,--xmldoc--,--+-documentid-+--)-><
                    '-NULL----'                         '-NULL-------'      

Description

The schema is SYSPROC.

The XDBDECOMPXML stored procedure uses an XML schema which contains annotations that indicate which columns and tables should be used to store the decomposed XML values. The referenced XML schema must exist in the XSR and must be enabled for decomposition. You can enable an XML schema for decomposition by using the XSR_COMPLETE stored procedure. If your XML schema references tables that did not exist when you invoked the XSR_COMPLETE stored procedure, DB2® will return an error.

rschema
An input parameter of type VARCHAR(128) that specifies the SQL schema for the XML schema. It must be a valid SQL identifier. The SQL schema is one part of the qualified name used to identify this XML schema in the XSR. (The other part of the name is supplied by the name parameter). This parameter can have the NULL value which indicates that name is implicitly qualified based on the rules specified in Qualification of unqualified object names.
If rschema is specified, it cannot be QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP.
name
An input parameter of type VARCHAR(128) that specifies the name of the XML schema. It must be a valid SQL identifier. The complete name for the XML schema for which decomposition is to be performed is rschema.name. The XML schema name must already exist and be enabled for decomposition as a result of calling the XSR_COMPLETE stored procedure. This parameter cannot have the NULL value.
xmldoc
An input parameter of type BLOB(2G) that points to the XML value that is to be decomposed. This parameter cannot be null.
documentid
An input parameter of type VARCHAR(1024) that contains a string that the caller can use to identify the input XML document. This parameter can be null.
End of change