Some XML Help

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

Post Reply
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Some XML Help

Post by tonystark622 »

Can anyone help me get some data output in XML the way my customer wants it?

What they want is:

<Interfaces>
<Interface>Data from Row 1</Interface>
<Interface>Data from Row 2</Interface>
<Interface>Data from Row 3</Interface>
</Interfaces>

In the XPath I have
/Interfaces/Interface/Data1/text()
/Interfaces/Interface/Data2/text()
...

With Aggregate All Rows selected we get:
<Interfaces><Interface>Data from Row 1</Interface></Interfaces>
<Interfaces><Interface>Data from Row 2</Interface></Interfaces>
<Interfaces><Interface>Data from Row 3</Interface></Interfaces>

Can anyone direct me in the right direction????

Thanks, Tony
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What happens if you remove "/Interfaces" from XPath?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

XML Pack 2.0? In the XML Output stage version 7.0, the XML generated is as you want it when Output mode is Aggregate all rows pretty much by default.
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Ray and Tom,

Thanks for your help. The developer got it to do what he wanted by playing with Key Fields in the XML Writer.

Sorry about the delay in responding.

Tony
Post Reply