regarding XML tags issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dvpawankumar
Participant
Posts: 46
Joined: Fri Oct 06, 2006 6:36 am
Location: Tucson

regarding XML tags issue

Post by dvpawankumar »

Hi All,

Any one help me on this.

I develeoped a job with XML as output. The output format appeared as

<TAG1>

DATA1

</TAG1>

<TAG2>

DATA2

</TAG2>

<TAG3>

DATA3

</TAG3>

<TAG4>

<TAG5>

DATA5

</TAG5>

<TAG6>

DATA6

</TAG6>


But I need this XML format as like below without any space and lines between the open tag and data also between closed tag.

<TAG1>DATA1</TAG1>

<TAG2>DATA2</TAG2>

<TAG3>DATA3</TAG3>

<TAG4>

<TAG5>DATA5</TAG5>

<TAG6>DATA6</TAG6>


Could anyone know the reason why it appeared in seperate lines rather in a single line.

Help me on this.


Thanks
Pawan
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hi Pawan...

First of all, from what I can see below, these are both exactly the same. Keep in mind that XML, when processed by a standard XML processor, follows certain rules --- one of which is that blanks and spaces are just "noise". Encapsulate both results inside of a complete document and review them in IE...they should look identical.

I'm surprised you got the "extra" blank lines, but either way XMLOutput stage is not going to give you exactly the "pretty" format you want, even with the formatted option (it never puts a whole element on a single line with a single CRLF).......in fact, I always recommend that you do not choose the formatting option --- it keeps your document smaller --- always a good idea.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply