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.2 Mapping Rule Examples

The following example shows how to convert one row of the results table to a set of XML documents.

[Figure L-1 Conversion of one Row of the Results Table to a Set of Data in XML Format]

The XML conversion function processes the results table line by line, and so the record set in the first row of the results table will be converted when the mapping rule definitions are applied.
The XML conversion procedure used in the example above is explained below. (Rule 1 to Rule 4 below refer to the mapping rules from the figure above.)

  1. From Rule 1, the root tag for the XML document (that will be output to a text file) will be "PERSON".
  2. From the tagname and parent attribute specification in Rule 2, the PERSON tag will have a child element called "NUM".
  3. From the colname attribute specification in Rule 2, the value of column A of the target record set will be obtained.
  4. The value of column A "001" obtained in step 3 will be output as the element of the NUM tag in the XML document.
  5. Rule 3 will be applied in the same way as steps 2 to 4.
  6. Rule 4 will be applied in the same way as steps 2 to 4.

[Figure L-2 Hierarchical Structure Showing Parent-child Relationship]


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006