SQL Anywhere uses the following rules for encoding names that are not legal XML names (for example, column names that include spaces):
XML has rules for names that differ from rules for SQL names. For example, spaces are not allowed in XML names. When a SQL name, such as a column name, is converted to an XML name, characters that are not valid characters for XML names are encoded or escaped.
For each encoded character, the encoding is based on the character's Unicode code point value, expressed as a hexadecimal number.
For example, the following query contains a column name with a space:
SELECT EmployeeID AS "Employee ID" FROM Employees FOR XML RAW;
and returns the following result:
<row Employee_x0020_ID="102"/> <row Employee_x0020_ID="105"/> <row Employee_x0020_ID="129"/> <row Employee_x0020_ID="148"/> ...
For information about the syntax of the FOR XML clause, see SELECT statement.
When executing queries that contain a FOR XML clause in Interactive SQL, you may want to increase the column length by setting the truncation_length option.
For information about setting the truncation length, see truncation_length option [Interactive SQL].
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|