Extended datatype support in for xml mappings  Using Java functions to map hierarchic XML documents and SQL data

Chapter 2: XML Services

Examples

These two examples show different versions of a SQLX result set containing the binary value 0x123abc.

This example specifies a hex value:

select 0x123abc for xml option 'binary=hex' 
------------------------------
<resultset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <row>
                <C1>123abc</C1>
        </row></resultset>

This example specifies a base64 value:

select 0x123abc for xml option 'binary=base64'
---------------------------------------
<resultset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       <row>
                <C1>Ejq8</C1>
        </row>




Copyright © 2004. Sybase Inc. All rights reserved. Using Java functions to map hierarchic XML documents and SQL data

View this book as PDF