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
Nisusmage
Premium Member
Posts: 103 Joined: Mon May 07, 2007 1:57 am
Post
by Nisusmage » Tue Apr 15, 2008 5:02 am
I couldn't find any posts regarding this issue of the XML format coming out of the XML output stage.
The XML format I'm expecting is:
Code: Select all
<DEDUCTIONS>
<DEDUCTION>
<SURNAME>MCDONALD</SURNAME>
<NAME>OLD</NAME>
</DEDUCTION>
<DEDUCTION>
<SURNAME>MCDONALD</SURNAME>
<NAME>NEW</NAME>
</DEDUCTION>
</DEDUCTIONS>
Instead I'm getting:
Code: Select all
<DEDUCTIONS>
<DEDUCTION>
<SURNAME>
MCDONALD
</SURNAME>
<NAME>
OLD
</NAME>
</DEDUCTION>
<DEDUCTION>
<SURNAME>
MCDONALD
</SURNAME>
<NAME>
NEW
</NAME>
</DEDUCTION>
</DEDUCTIONS>
Has anyone figured out how to change the format of the XML Output stage to follow these rules?
Thanks in advance.
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Apr 15, 2008 6:17 am
Why do you think you need that format? Parsers don't care, only people do. You have two choices with the stage: unformatted (aka 'one long line') or formatted as you've shown you are getting. We stick with unformatted out of the gate and only 'pretty' it when people need to look at it.
For that, you'll either need a command line 'pretty print' tool (which is what the output you are expecting is called) or you'll need to roll your own. Or just let something like XML Spy pretty the one-offs for you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Nisusmage
Premium Member
Posts: 103 Joined: Mon May 07, 2007 1:57 am
Post
by Nisusmage » Tue Apr 15, 2008 6:48 am
Good Point ..
I was trying to format it for the human eye.
thanks for the input.
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
eostic
Premium Member
Posts: 3838 Joined: Mon Oct 17, 2005 9:34 am
Post
by eostic » Tue Apr 15, 2008 7:19 am
....or just exclusively open it via IE for human consumption. It's nearly always "pretty" there because it parses it correctly.
Ernie
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Apr 15, 2008 7:34 am
Good Point ..
Any idea what kind of file sizes IE can handle?
-craig
"You can never have too many knives" -- Logan Nine Fingers
Nisusmage
Premium Member
Posts: 103 Joined: Mon May 07, 2007 1:57 am
Post
by Nisusmage » Tue Apr 15, 2008 8:40 am
I changed the format to unformatted in datastage and used MS Visual Studio to reformat it.
Code: Select all
Edit -> Advanced -> Format Document. Save.
Worked wonders. IE is very slow rendering XML. And I needed it in a clean format quickly for me to see that what I was getting was correct. I found VS 2005 much faster to open and reformat.
G
~The simpliest solutions are always the best~
~Trick is to understand the complexity to implement simplicity~
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Apr 15, 2008 3:14 pm
If you can figure out how to do that from a command line, you can fire up that command as an after-stage or after-job subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.