XML source File -> EXTRACT DATA
Posted: Sat Dec 01, 2012 10:19 am
Hi Experts
I need your help !!!
Currently working on DS 8.1 installed on a Unix box (server) / client running on Windows
In a parallele job I would like to load a XML file which uses the structure below:
I would like to extract all the data from the XML file and save it in a flat file/database...whatever as below
Currently I'm able to load the file if there is only a single node (<T0041DIST>) in the XML file as below (see the structure of the XML file below) using the following Stages:
Sequential File -> XML input -> Sequential file
BUT NOW how to read the file when the main node is repeated ? and extract all the data ???
Thanks in advance for your help
I need your help !!!
Currently working on DS 8.1 installed on a Unix box (server) / client running on Windows
In a parallele job I would like to load a XML file which uses the structure below:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2012-11-08T16:01:23">
<T0041DIST>
<Kantoor>499</Kantoor>
<KantoorTaalregime>3</KantoorTaalregime>
<Directie>2</Directie>
</T0041DIST>
<T0041DIST>
<Kantoor>500</Kantoor>
<KantoorTaalregime>2</KantoorTaalregime>
<Directie>0</Directie>
</T0041DIST>
<T0041DIST>
<Kantoor>501</Kantoor>
<KantoorTaalregime>2</KantoorTaalregime>
<Directie>3</Directie>
</T0041DIST>
.....
</dataroot>
Code: Select all
Kantoor KantoorTaalregime Directie
499 3 2
500 2 0
501 2 3
....
Sequential File -> XML input -> Sequential file
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2012-11-08T16:01:23">
<T0041DIST>
<Kantoor>499</Kantoor>
<KantoorTaalregime>3</KantoorTaalregime>
<Directie>2</Directie>
</T0041DIST>
</dataroot>
Thanks in advance for your help