ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Output XML

Post new topic  Reply to topic
 Output XML « View previous topic :: View next topic » 
Author Message
neo_revolution
PostPosted: Mon Feb 23, 2004 10:34 am    Post subject: Output XML Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Hi,

I am trying to create output XML tree from a XML input.

My code reads something like this

SET myOutXML.outHeader1.outBody.outField1.outValue =
myInXML.inHeader1.inBody.inField1.inValue;

The problem I am facing is that if
insubfield1 = NULL

my output XML reads something like this

<myOutXML>
<outHeader1>
<outBody>
</outField1>
</outBody>
</outHeader1>
</myOutXML>

if you see it is creating the parent "</outField1>" if the input value is null

Is there anyway we can avoid creating the parent closing tag if the field value is null

Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
Missam
PostPosted: Mon Feb 23, 2004 11:02 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Are you sure whether your input field is NULL or EMPTY STRING
Back to top
View user's profile Send private message
neo_revolution
PostPosted: Mon Feb 23, 2004 11:46 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

actually its creating <outField1/> as output tag...

my input value is null
Back to top
View user's profile Send private message Yahoo Messenger
Missam
PostPosted: Mon Feb 23, 2004 12:17 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

If you have an Input XML Element without Data in it(Tags Exist with no Data).You will get an Empty tag as output,what you are seeing exactly as in your case.
Input or Output Element NULL means you won't even see tags.
If you don't want to see empty tags in your output, you need to handle it before constructing the output element.
Back to top
View user's profile Send private message
neo_revolution
PostPosted: Mon Feb 23, 2004 12:41 pm    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

I figured out that... I need to handle it before creating the output tree... Thanks
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Output XML
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.