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.2 Extracting Structured Data in XML Format

The following example shows how to extract structured XML document.

Results Table

The following mapping rule extracts data from the specified column of the first row in the results table, and generates the XML document with a multi-level structure under the PERSON root tag.

Mapping Rule

<?xml version="1.0"?>
<MappingRule>
<parentRule id="p1" tagname="PERSON" />
<columnRule id="c1" colname="A" tagname="NUM" parent="p1" />
<columnRule id="c2" colname="B" tagname="NAME" parent="p1" />
<columnRule id="c3" colname="C" tagname="JOB" parent="p1" />
<parentRule id="p2" tagname="DETAIL" parent="p1" />
<columnRule id="c4" colname="E" tagname="LOCNUM" parent="p2" />
<columnRule id="c5" colname="F" tagname="LOC" parent="p2" />
</MappingRule>

This mapping rule outputs the following XML document:

[Figure L-4 XML Output Data]


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006