1.14.1 XML type description format

Organization of this subsection
(1) Format
(2) Data format
(3) Maximum length
(4) Generating values
(5) Retrieving values
(6) Value expression specification
(7) Data types that can be converted (assigned or compared)
(8) Null value
(9) Notes on usage

(1) Format

In places where a data type is called for, the XML type is specified as follows:

XML

(2) Data format

XML documents are processed in a parsed format using the XML conversion command (phdxmlcnv) or an XML conversion library. This format is known as ESIS-B format.

(3) Maximum length

An XML type value in ESIS-B format cannot exceed 2,147,483,647 bytes. In ESIS-B format, the length depends not only on the length of the XML document, but also on its structure, such as the number of XML elements.

(4) Generating values

XML type values can be generated using the XML constructor function or the XMLPARSE function.

For details about the XML constructor function, see 1.14.2 XML constructor function. For details about the XMLPARSE function, see 1.14.3(3) XMLPARSE.

(5) Retrieving values

XML type values cannot be retrieved directly by a UAP. XML type values can be retrieved as VARCHAR or BINARY type values using the following method.

(6) Value expression specification

The following can be specified as XML type value expressions:

(7) Data types that can be converted (assigned or compared)

XML type values can be assigned only to columns, SQL variables, and SQL parameters defined as the XML type. Values of other data types cannot be assigned to the XML type. Furthermore, comparisons between other data types and the XML type are not permitted.

(8) Null value

If no value is generated by the XML constructor function, or if a null value is specified as an argument to the XML constructor function, its XML type value is the null value. If the null value is specified as an argument to the XMLPARSE function, the XML type value is also the null value.

(9) Notes on usage

  1. The owner must access HiRDB XML Extension as MASTER in order to be able to use the XML type, as well as the following functions:
    • XML constructor function
    • XMLQUERY function
    • XMLSERIALIZE function
    • XMLEXISTS predicate
    • XMLAGG set function
    • XMLPARSE function
    • CREATE INDEX Format 3 (define substructure index)
  2. The XML type cannot be used with the following facilities:
    • Indexes defined using CREATE INDEX Format 1
    • Sorting
    • Grouping
    • Set operations, arithmetic operations, and concatenation operations
    • Set functions other than XMLAGG
    • Exclusion of duplicates
    • CASE expressions
    • CAST specifications
    • External reference columns
  3. The only XML type values that can be stored in a column using an INSERT or UPDATE statement are values generated by an XML constructor function that were specified as an insertion value or update value.