Interstage Shunsaku Data Manager アプリケーション開発ガイド - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX共通 -
目次 索引 前ページ次ページ

付録L XML変換機能のマッピングルール> L.3 マッピングルールの変換例

L.3.5 列のデータを固定属性として抽出するパターン

列のデータを固定属性としてXML文書を抽出する場合の例を、以下に示します。

結果表

結果表の指定した列から特定のタグの固定属性名としてXML文書を生成するパターンのマッピングルールを、以下に示します。
なお、マッピングルールは、以下のタグの固定属性名とした場合の例です。

マッピングルール

<?xml version="1.0"?>
<MappingRule>
<parentRule id="p1" tagname="PERSON" />
<columnRule id="c1" colname="A" tagname="NUM" parent="p1" />
<attributeRule id="a1" colname="B" attrname="name" attrof="c1" />
<columnRule id="c2" colname="D" tagname="NAME" parent="p1" />
<attributeRule id="a2" colname="C" attrname="name" attrof="c2" />
<columnRule id= "c3" colname="E" tagname="JOB" parent="p1" />
<attributeRule id="a3" colname="F" attrname="name" attrof="c3" />
</MappingRule>

上記マッピングルールから出力されるXML文書は、以下のようになります。


目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2006