Repetitive Header in XML output file

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
shilpa79
Participant
Posts: 131
Joined: Thu Jan 20, 2005 5:59 pm
Location: Virginia

Repetitive Header in XML output file

Post by shilpa79 »

sample file:

<EnterpriseDocument InterfaceName="XXXXXXXX" Version="1.0" CreationTimestamp="2007-03-19 18:16:51" CreationSource="Enterprise">
--<Fuel BUC="001418" Date="01/12/2007" BILL="096146" BOLDate="2007-06-01" INVNO="627740123">
<Item lID="1020" VOL="2100.000" fuelExtendedCost="5636.16
"/>
</Fuel>
</EnterpriseDocument>
<EnterpriseDocument InterfaceName="XXXXXXXX" Version="1.0" CreationTimestamp="2007-03-19 18:16:51" CreationSource="Enterprise">

The header is repeating for each detail .I would like to get just the header
once and detail in multiple

Which will be the best way to do that.

Thanks,
anntaylor
Participant
Posts: 24
Joined: Tue May 10, 2005 5:17 pm

Post by anntaylor »

I believe you need to set the lowest level on the output as the key. Item lID in this case.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or post your XPath expressions and indicate which you've marked as the key.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply