Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Appendix L XML Conversion Function Mapping Rules | > L.3 Mapping Rule Conversion Examples |
The following example shows how to extract XML documents by using column data as attribute values.
Results Table
The following mapping rule generates XML documents in where a specific column value in the results table is used as the attribute value for a particular tag.
This mapping rule shows an example of how to set an attribute named 'LOC' for the JOB tag, and to use values in column F as the values for this attribute.
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" /> <attributeRule id="a1" colname="F" attrname="LOC" attrof="c3" /> </MappingRule> |
This mapping rule outputs the following XML document:
Contents
Index
![]() ![]() |