Hi Friends,
I've created several XML documents using XML stages in DataStage.
When I viewed the files in the vi editor the XML tags are on separate lines as follows:
<BEGIN_DATE>
09/25/2006 12:00:00 AM
</BEGIN_DATE>
<END_DATE>
09/24/2006 12:00:00 AM
</END_DATE>
but it should be like
Good morning, folks. I've created several XML documents using XML stages in DataStage.
When I viewed the files in the vi editor the XML tags are on separate lines as follows:
<BEGIN_DATE>09/25/2006 12:00:00 AM </BEGIN_DATE>
<END_DATE> 09/24/2006 12:00:00 AM </END_DATE>
Please help me out on this.
thanks and appreciated in advance.
xml output in one line
Moderators: chulett, rschirm, roy
You've got two choices with XML in DataStage out of the box: you can generate 'formatted output' or leave it unformatted.
Formatted is what you've shown in your first example. It is more for people rather than processes as automated processes don't care about formatting aka 'pretty printing'. Personally I haven't found anyone that likes the way DataStage formats the output.
Unformatted is where the entire file is basically one long record.
If you want something else, a different 'flavor' of formatting, you have two choices as far as I know:
1) Use an XML Transformer with a custom stylesheet you provide.
2) Generate unformatted output and then 'pretty print' it as a separate step after the job completes.
We went with option #2. Option #1 is documented in that 'XML Designer' pdf document in your Docs directory, from what I recall.
Formatted is what you've shown in your first example. It is more for people rather than processes as automated processes don't care about formatting aka 'pretty printing'. Personally I haven't found anyone that likes the way DataStage formats the output.
Unformatted is where the entire file is basically one long record.
If you want something else, a different 'flavor' of formatting, you have two choices as far as I know:
1) Use an XML Transformer with a custom stylesheet you provide.
2) Generate unformatted output and then 'pretty print' it as a separate step after the job completes.
We went with option #2. Option #1 is documented in that 'XML Designer' pdf document in your Docs directory, from what I recall.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers