Hi,
We have a requirement where we have to convert values from a DB table to XML.We are able to get the XML output but the format is not as required:
O/P now:- <position>
- <bondfwd>
<Position_Name>ACGB Fwd 02-08-06 6.2500% 04-15-15</Position_Name>
<Notional>660000</Notional>
<Currancy>AUD</Currancy>
<Coupon>6</Coupon>
<Coupon_Frequency>Bimonthly</Coupon_Frequency>
<Start_Date>04-15-2002</Start_Date>
<Maturity_Date>04-15-2015</Maturity_Date>
<Market_Price>107</Market_Price>
<Settlement_date>02-08-2006</Settlement_date>
<Settlement_price>107</Settlement_price>
- <customBucketList>
- <customBucket>
<customDimensionName>Account_ID Account_Name</customDimensionName>
<customBucketValue>9369 WTC-CIF Real Asset</customBucketValue>
</customBucket>
</customBucketList>
</bondfwd>
- <bondfwd>
O/P required:
- <position>
- <bondfwd>
<Position_Name>ACGB Fwd 02-08-06 6.2500% 04-15-15</Position_Name>
<Notional>660000</Notional>
<Currancy>AUD</Currancy>
<Coupon>6</Coupon>
<Coupon_Frequency>Bimonthly</Coupon_Frequency>
<Start_Date>04-15-2002</Start_Date>
<Maturity_Date>04-15-2015</Maturity_Date>
<Market_Price>107</Market_Price>
<Settlement_date>02-08-2006</Settlement_date>
<Settlement_price>107</Settlement_price>
- <customBucketList>
- <customBucket>
<customDimensionName>Account_ID </customDimensionName>
<customBucketValue>9369 WTC</customBucketValue>
<customDimensionName>Account_Name </customDimensionName>
<customBucketValue>CIF Real Asset</customBucketValue> </customBucket>
</customBucketList>
</bondfwd>
- <bondfwd>
DS is aggregating all the dimension names automatically.We need each dimension name and their values displayed seperately.
Kindly help.
Rgds
Sanjeev
XML output
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 15
- Joined: Wed May 26, 2004 6:30 am
This doesn't seem to help us.
The O/P we want:
- <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>
While DS generats:
- <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()
This grammar was obtained after creating a dummy XML in the required format and then importing it thru director.
Pl. help
Thank You.
The O/P we want:
- <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>
While DS generats:
- <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()
This grammar was obtained after creating a dummy XML in the required format and then importing it thru director.
Pl. help
Thank You.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Duplicate thread, I just made the same suggestion as Craig a few seconds ago! How did you get "9369 WTC-CIF Real Asset"? This looks like a concatenation of values with a - added, do you have some type of output stylesheet applied? It seems odd it would concatenate values with - as a seperator.
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