Start of change

XMLCOMMENT

The XMLCOMMENT function returns an XML value with the input argument as the content.

Read syntax diagramSkip visual syntax diagram
>>-XMLCOMMENT--(--string-expression--)-------------------------><

string-expression
An expression that returns a value of any built-in character-string or graphic-string data type. It cannot be CHAR or VARCHAR bit data. The result of string-expression is parsed to check for conformance to the content of an XML comment, as specified by the following rules:
  • '–' (double hyphen) must not occur in the string expression.
  • The string expression must not end with a hyphen ('-').
  • Each character of the string can be any of the following characters as represented by the Unicode code points: #x9, #xA, #xD, #x20-#xD7FF, #xE000-#xFFFD, #x10000-#x10FFFF.
If string-expression does not conform to the previous rules, and error is returned.

The result of the function is XML. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Example

End of change