Mapping SQL identifiers to XML names
Many SQL identifiers that contain certain characters must be escaped when the SQL identifier is converted into an XML name.
Strings that start with 'XML', in any case combination, are reserved for standardization, and characters such as '#', '{', and '}' are not allowed in XML names. Many SQL identifiers containing these characters need to be escaped when the SQL identifiers are converted into XML names.
Db2 applies full escaping to SQL identifiers that are column names when it derives XML names. The mapping converts a colon (:) to _x003A_, _x to _x005F_x, and other restricted characters to a string of the form _xuuuu_ where uuuu is the Unicode value for the character. An identifier with an initial 'XML' (in any case combination) is escaped by mapping the initial x to _x0078_, or the initial X to _x0058_.