Hi All,
I have my xml file format as :
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Generated by Ascential Software Corporation, DataStage - XMLOutput stage - Fri Jan 25 11:12:48 2008
-->
- <xtd:BO xmlns:xtd="http://service.gap.com/GenericSchema" xmlns:esb="http://service.gap.com/schemas/BHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <esb:BHeader>
<esb:EnvironmentName>Development</esb:EnvironmentName>
<esb:VersionNbr>1.0</esb:VersionNbr>
- </esb:BHeader>
- <xtd:BOPayload>
- <xtd:Data>
- <![CDATA[ 30|8|84|842|02|2006241200|JAN 2007|2006241251|WK 51 -1/20/2007|+0000000047880.50|+0000000083334.80|+0000000013631|+0000000000000
]]>
</xtd:Data>
- <xtd:Data>
- <![CDATA[ 30|8|84|842|02|2006241200|JAN 2007|2006241251|WK 51 - 01/20/2007|+0000000047880.50|+0000000083334.80|+0000000013631|+0000000000000
]]>
</xtd:Data>
</xtd:BOPayload>
</xtd:BO>
Bascially I dont want to get the CDATA and Data Tag at the end of each record.
I want all my records in CDATA as one big chunk.
Please advise.
Thanks,
With Regards,
Kumar66
But I need the format to be
!-- Generated by Ascential Software Corporation, DataStage - XMLOutput stage - Mon Nov 19 15:49:21 2007
-->
- xtd:BO xmlns:xtd="http://service.gap.com/GenericSchema" xmlns:esb="http://service.gap.com/schemas/BHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <esb:BHeader>
<esb:EnvironmentName>Development</esb:EnvironmentName>
<esb:VersionNbr>1.0</esb:VersionNbr>
- </esb:BHeader>
- <xtd:BOPayload>
- <xtd:Data>
- <xtd:BOPayload>
- <xtd:Data>
- <![CDATA[30|8|84|842|02|2006241200|JAN 2007|2006241251|WK 51 - 01/20/2007|+0000000047880.50|+0000000083334.80|+0000000013631|+0000000000000
30|8|84|842|02|2006241200|JAN 2007|2006241251|WK 51 - 01/20/2007|+0000000047880.50|+0000000083334.80|+0000000013631|+0000000000000
]]>
</xtd:Data>
</xtd:BOPayload>
</xtd:BO>
Formatting XML files
Moderators: chulett, rschirm, roy
Repeating rows = repeating elements. That is by design.
What you might want to do, if all you want is to squish everything into a single giant CDATA specification, is to build the xml yourself. All you need is the tiny header information thru the CDATA opening, and the final closing tags. Put the header info in its own column in a Transformer, and append it (prefix) only to the very first row that comes into the Job. Concatenate the other columns in your row as needed, and keep flowing them into your selected target Stage without any formatting. When the job is done, apply the closing tag and be done. Then it will work with 10 rows or 10 million rows, and you wont have to worry about any sizing constraints in the XML stage.
Ernie
What you might want to do, if all you want is to squish everything into a single giant CDATA specification, is to build the xml yourself. All you need is the tiny header information thru the CDATA opening, and the final closing tags. Put the header info in its own column in a Transformer, and append it (prefix) only to the very first row that comes into the Job. Concatenate the other columns in your row as needed, and keep flowing them into your selected target Stage without any formatting. When the job is done, apply the closing tag and be done. Then it will work with 10 rows or 10 million rows, and you wont have to worry about any sizing constraints in the XML stage.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>