How to remove the empty tags in Hierarchical Stage

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
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

How to remove the empty tags in Hierarchical Stage

Post by kumar66 »

Hi All,

I have to remove the empty tags in XML. My parent tag in the xsd has the min occurs =0 and child tag associated with the parent has min occurs =1.

If I don' t receive parent value then i should not send the child tag . Since the min occurs for the child tag =1 , the tag is getting populated.

Is there a way i can discard these tags?

Please Advice.

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

Post by ray.wurlod »

The obvious comment is that your XSD is not well-formed; a child should not have minoccurs=1 if the parent has minoccurs=0.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

When one of our Treasury feeds went through a major overhaul of their XML, they sent us not quite valid xsd files for the new version that apparently no-one else had pointed out to them yet. They were quite helpful in getting us new versions even if it did take more than a couple of tries. :wink:

Of course, for something simple like that, you could always "fix" it yourself.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Ray & Craig,

Thanks for the responses.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Also, while its hard to determine your problem by just reading your symptom, be sure you have your Composer step settings established correctly, and that you are passing in true "null values" for any elements you don't want to be written into the document.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

there is a checkbox in the stage somewhere to eliminate empty tags.
I can't recall exactly where.
Post Reply