Page 1 of 1

XML output Stage

Posted: Tue Feb 02, 2010 1:08 pm
by suneelchallagali
I am using simple Job

Seq_File > Xml_Input > Seq_File

<xml>
<id>1</id>
<id>2</id>
<id>3</id>
<car>audi</car>
<car>acura</car>
<car>Honda</car>
</xml>

Output i am getting as

Name ID
audi 1
acura 1
Honda 1

please help me out to get associate ID's for Associate name fields such as

Name ID
audi 1
acura 2
Honda 3


thank you

Posted: Tue Feb 02, 2010 4:49 pm
by eostic
Sadly, that's a poorly designed xml document. The id's and car names should be together in their own repeating element if they are truly related as you have indicated. This looks like a simple example...do you know anything more about the document? Is the array size always 3? Is it entirely variable? Anything else that you know about it?

Ernie

Posted: Tue Feb 02, 2010 4:51 pm
by eostic
Sadly, that's a poorly designed xml document. The id's and car names should be together in their own repeating element if they are truly related as you have indicated. This looks like a simple example...do you know anything more about the document? Is the array size always 3? Is it entirely variable? Anything else that you know about it?

Ernie

Posted: Tue Feb 02, 2010 10:10 pm
by suneelchallagali
Thanks for your response eostic. Actaully just for testing the xml input and output stages i have took the example. If possible can you guide me with this stages like how to use it

Posted: Tue Feb 02, 2010 11:01 pm
by ray.wurlod
That's what the manuals are for. It may even be that IBM offers a class in using XML with DataStage. Check it out on their website - training is usually buried under Services.

You couldn't afford what IBM would charge for Ernie!

Posted: Wed Feb 03, 2010 12:26 am
by eostic
Thank you Ray.........but that being said, do a few minutes of searching...you'll find hundreds of threads on xml in this forum with all kinds of input from myself and many others......including examples, etc. etc. etc. etc. etc. etc.

Ernie

Posted: Wed Feb 03, 2010 8:24 am
by chulett
One of the best references out there is here.

Posted: Wed Feb 03, 2010 11:08 am
by suneelchallagali
Thank you all for your support and help!!!!