getting repeated values in xml

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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

getting repeated values in xml

Post by sravanthi »

Hi,

I have a job where my o/p is xml and i/p is dataset.

My problem is in dataset the data is correct but in xml for single tag values are repeating.

Example:

In i/p for a column "name" the data is "not_ready".

But for name the o/p i'm getting :
<name>
<Value>not_ready not_ready</Value>
</name>

So what could be the problem.Can anyone help on this.

Thanks!
sravanthi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Post your XPath expressions. Do you have any of them marked as a Key field? Also curious, did you create the XPath expressions by hand or did you import the metadata for them from an xsd and let the tool generate them for you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

Hi,

I have created the expressions manually.
The path i have used is
/AmazonEnvelope/Message/Item/name/Value/text()

Some of the values are not repeating some of them are repeating.
Can you please tell me what would be the problem
Thanks!
sravanthi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unless you are very familiar with how this all works, I'd suggest you not manually create the expressions. Let the tool do it for you.

Do you have an .xsd for this? That would be best but you can use a sample of the output file as well. Use the Manager to import that metadata and see what it generates in the way of XPath expressions for it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply