Reference Guide > TDV Support for SQL Functions > TDV-Supported XML Functions > Identifier Escaping
 
Identifier Escaping
When creating XML nodes with XML elements, the name of the node can be escaped according to ANSI specification 9075-14, paragraph 4.10.3. The ANSI specification provides two modes of escaping:
full escaping
partial escaping
TDV Server uses partial escaping. Only alphabetical characters and underscore can be leading characters. All other characters are converted.
Partially escaped identifiers escape all nonleading numerical characters except minus (-), underscore (_), and colon (:) with the format _xDDDD_ where DDDD is the hexadecimal equivalent of the ASCII character. For example, the ampersand character (&) is converted to _x0026_.
Examples
XMLELEMENT (NAME "29", 'text')
 
This results in <_x0032_9>text</_x0032_9>
XMLFOREST ('black' AS ":")
 
This results in <_x003A_>black</_x003A_>
XMLFOREST ('black' AS "a:-")
 
This results in <a:->black<a:->