Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix L XML Conversion Function Mapping Rules> L.3 Mapping Rule Conversion Examples

L.3.8 Extracting Binary Data

The following example shows how to extract XML documents from results tables that include binary data.

Refer to 12.7 Data Types Supported by the XML Conversion Function for details on the compatibility between the data types that can be used with the XML conversion function and binary data in the results table.

Results Table

In the results table below, column D contains binary data.

The following mapping rule generates the XML document that includes binary data from this results table.

Mapping Rule

<?xml version="1.0"?>
<MappingRule>
<parentRule id="p1" tagname="Rep" />
<columnRule id="c1" colname="A" tagname="NUM" parent="p1" />
<columnRule id="c2" colname="B" tagname="DATE" parent="p1" />
<columnRule id="c3" colname="C" tagname="HOROSCOPE" parent="p1" />
<columnRule id="c4" colname="D" tagname="SCRIPT" parent="p1" handler="BINARYDATA" handler-arg="XML" />
</MappingRule>

This mapping rule outputs the following XML document:


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006