Native XML

The XML Services feature of Adaptive Server includes the following new built-in functions and clauses:

If you create views or stored procedures using one of these features in 12.5.4, then return to 12.5.0.3, you get an error that the feature is not supported in that version. If you store XML documents in:

For example, if a column named xmlindexed contains data generated in Adaptive Server 12.5.4 by the xmlparse built-in function, you can regenerate the text form of the document in the xmlsource column with the following SQL statement that uses the Adaptive Server 12.5.4 xmlextract built-in function:

update xmltab 
set xmlsource = xmlextract("/", xmlindexed) 

You may then do one of the following:

If you do not want to add the xmlsource column, you can combine these steps with the following SQL statement in ASE 12.5.4:

update xmltab 
set xmlindexed 
= com.sybase.xml.xql.Xql.parse 
(xmlextract("/", xmlindexed))

Prior to execution of this update statement, the xmlindexed column contains the parsed form of the documents generated by the xmlparse 12.5.4 built-in function. After the update statement, that column contains the parsed form of the documents, generated by the com.sybase.xml.xql.Xql.parse Java-based method, suitable for processing in Adaptive Server12.5.0.3 with the com.sybase.xml.xql.Xql.query Java-based method.

A configuration parameter was added to enable XML in 12.5.4. When you first restart with the prior version, you may see error message 5859 advising you that the parameter is unknown. After running installmaster from the pre-12.5.4 version this warning should no longer appear.