This section demonstrates regenerating the text form of the documents from the form generated for the native XML processor.
If the xmlindexed column contains data generated by the xmlparse function, you can regenerate the text form of the document in the new xmlsource column with the following SQL statement:
update xmltab set xmlsource = xmlextract("/", xmlindexed)
You can then
process the xmlsource column directly with the Java-based XQL processor, using com.sybase.xml.xql.Xql.query, OR
update the xmlindexed column with the parsed form suitable for processing with the Java-based XQL processor, using the following statement:
update xmltab set xmlindexed = com.sybase.xml.xql.Xql.parse(xmlsource)
If you don't want to add the xmlsource column, you can combine these steps, as in the following SQL statement:
update xmltab set xmlindexed = com.sybase.xml.xql.Xql.parse (xmlextract("/", xmlindexed))
Before this update statement is executed, the xmlindexed column contains the parsed form of the documents, generated by the xmlparse built-in function. After the update statement, that column contains the parsed form of the documents, generated by com.sybase.xml.xql.Xql.parse, suitable for processing with com.sybase.xml.xql.Xql.query.