1.0

Table Of Contents
Syntax in CREATE TABLE
{ VARCHAR | CHAR VARYING | CHARACTER VARYING }[(length)] FOR BIT DATA
XML
This type can be used for Extensible Markup Language (XML) documents:
to store XML documents that conform to the SQL/XML denition of a well-formed XML(DOCUMENT(ANY))
value
Transiently for XML(SEQUENCE) values, that might not be well-formed XML(DOCUMENT(ANY)) values
Note:
SQLFire does not support the SQLXML type from the SQL standard, or the java SQLXML type, rather
the values are stored as normal strings and user must use XMLSERIALIZE, XMLPARSE functions
explicitly for inserts and queries as appropriate.
For an application to execute XML related functions, the application must either use a JDK having inbuilt
JAXP/Xalan support (e.g. Sun JDK5) or must have classes for a JAXP parser and for Xalan in the server classpath
(serializer.jar, xalan.jar).
To fetch XML values from a SQLFire database using JDBC or ADO.NET drivers, use the XMLSERIALIZE
operator in the SQL query. For example:
SELECT XMLSERIALIZE(doc as CLOB) FROM t1
Then retrieve the XML value by using the ResultSet.getXXX method that corresponds to the target serialization
type (e.g. getClob in above example using CLOB data types). To store an XML value into a SQLFire database
using JDBC, use the XMLPARSE operator in the SQL statement. For example:
INSERT INTO t1(doc) VALUES XMLPARSE( DOCUMENT CAST (? AS CLOB) PRESERVE
WHITESPACE)
Then use any of the PreparedStatement.setXXX methods that are compatible with String types (e.g. in the above
example use PreparedStatement.setString or PreparedStatement.setCharacterStream).
java.lang.String; use explicit XML functions for inserts/queries as
explained above
Equivalent Java type
java.lang.Integer.MAX_VALUE (2147483647)Maximum length
noneJDBC metadata type
as per the target serialization typeJDBC methods
System.String; use explicit XML functions for inserts/queries as
explained above
Equivalent .NET type
noneADO.NET metadata type
noneADO.NET mapped System.Data.Dbtype
DbDataReader.GetStringADO.NET getter
SQL Standards Conformance
Understand how SQLFire conforms to SQL standards.
The feature is supported in SQLFire.Yes
vFabric SQLFire User's Guide584
vFabric SQLFire Reference