Data Integration
- Data Integration
- All Products
<?xml version="1.0" encoding="UTF-8"?> <document> <product> <id>1</id> <name>milk</name> <size>16 oz</size> </product> <product> <id>2</id> <name>water</name> <size> 8 oz</size> </product> </document>
Property | Value |
---|---|
Flat File Type | Delimited |
Text Qualifier | None |
Field Labels | Auto-generate |
First Data Row | 1 |
Property | Value |
---|---|
Input Field | Incoming string field from the Source transformation. |
Input Type | File |
Format Type | XML |
Variable Name in Template | root |
Code Page | UTF-8 |
<?xml version="1.0" encoding="UTF-8"?> <!--Generation date: $function.call('Systimestamp')--> ## Convert each product to an element: <products> #foreach ($child in $root.getRootElement().getChildren() ) <$child.getChild("name").getText()> <id>$child.getChild("id").getText()</id> <size>$child.getChild("size").getText()</size> </$child.getChild("name").getText()> #end </products>
<?xml version="1.0" encoding="UTF-8"?> <!--Generation date: 06/17/2020 17:45:41.341526--> <products> <milk> <id>1</id> <size>16 oz</size> </milk> <water> <id>2</id> <size> 8 oz</size> </water> </products>