Hi I want to generate one xml file usinf datastasge 7.5 server job
the file should look like
- <position>
- <bondfwd>
<Position_Name>ACGB Fwd</Position_Name>
<Notional>660000</Notional>
- <customBucketList>
- <customBucket>
<customDimensionName>Account_ID</customDimensionName>
<customBucketValue>9369</customBucketValue>
</customBucket>
- <customBucket>
<customDimensionName>Account_Name</customDimensionName>
<customBucketValue>Real Asset</customBucketValue>
</customBucket>
</customBucketList>
</bondfwd>
- <bondfwd>
But while generation thru datastasge it is generating as
- <position>
- <bondfwd>
<Position_Name>ACGB Fwd </Position_Name>
<Notional>660000</Notional>
- <customBucketList>
- <customBucket>
<customDimensionName>Account_ID Account_Name</customDimensionName>
<customBucketValue>9369 Real Asset</customBucketValue>
</customBucket>
</customBucketList>
</bondfwd>
- <bondfwd>
I have defined the grammar as
Position_Name-------/position/bondfwd/Position_Name/text()
Notional------------/position/bondfwd/Notional/text()
Account_ID----------/position/bondfwd/customBucketList/customBucket/customDimensionName
Account_ID_value----/position/bondfwd/customBucketList/customBucket/customBucketValue/text()
Account_Name--------/position/bondfwd/customBucketList/customBucket/customDimensionName
Account_Name_value--/position/bondfwd/customBucketList/customBucket/customBucketValue/text()
My source data looks like
Position_Name,Notional,Account_ID,Account_ID_value,Account_Name,Account_Name_value
ACGB Fwd,660000,Account_ID,9369,Account_Name,Real Asset
Please help me to get the proper output format.
Thanks for you help.
Proper XML format output
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
One trick you can try with XML output is to create a sample XML output file in notepad, similar to the one you created in your example, then import it using import XML table. The importer will convert it to a set of column definitions which you can load into your XML output stage or use to set up your existing columns.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn