how to read a repeated xml hierarchy

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
uegodawa
Participant
Posts: 71
Joined: Thu Apr 27, 2006 12:46 pm

how to read a repeated xml hierarchy

Post by uegodawa »

Hi,
I'm going to read a repeated xml hierarchy and extract some key column to a flat file. It always output the first row ?? I guess we need to XSLT or DTD before hand we read the xml file. Please let me know if you know anything about this problem.
Thanks
-U
Here is the sample input : Where LevelID and LevelCode are repeating in the same xml itself.

- <Product_Hierarchies>
- <Store>
- <ProductHierarchy>
- <Level Parent="0">
<TranType>T</TranType>
<LevelId>6</LevelId>
<HostTechKey>9</HostTechKey>
- <LevelName>
<Language>en</Language>
<Name>RAMPAGE</Name>
</LevelName>
<LevelCode>2</LevelCode>
- <Level Parent="9">
<TranType>T</TranType>
<LevelId>5</LevelId>
<HostTechKey>11</HostTechKey>
- <LevelName>
<Language>en</Language>
<Name>DIVISION 6 - ACC - RAMPAGE</Name>
</LevelName>
<LevelCode>6</LevelCode>
- <Level Parent="11">
<TranType>T</TranType>
Post Reply