Migrating text documents between the Java-based XQL processor and the native XML processor

Suppose that you have a table such as the following, in which you have stored the text form of documents in the xmlsource column:

create table xmltab (xmlsource text, xmlindexed image)

If you want to process the documents with the native XML processor, using the xmlextract and xmltest built-in functions, you can update the table as follows:

update xmltab
set xmlindexed = xmlparse(xmlsource)

If you want to process the documents with the Java-based XQL processor, using the com.sybase.xml.xql.Xql.query method, you can update the table as follows:

update xmltab
set xmlindexed
    = com.sybase.xml.xql.Xql.parse(xmlsource)