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 » Special Character after XML Tags

Post new topic  Reply to topic
 Special Character after XML Tags « View previous topic :: View next topic » 
Author Message
vedbhat
PostPosted: Thu Jul 27, 2006 12:35 am    Post subject: Special Character after XML Tags Reply with quote

Disciple

Joined: 19 Mar 2002
Posts: 186
Location: Singapore

Hi,

Below is the code to copy the Message Header and Environment tree to Output Message. After Coping and coming out of Compute Node, I see Special Characters (Carriage Return, New Line Character after every Tag).

I am not sure how and why is it getting generated. Anyway to suppress this. Any help would be appreciated.

-----------------------
CALL CopyMessageHeaders(); -- Invoking standard Copy Header Routine

DECLARE tagName CHAR 'CommentAddRq';
...
...
...
...
SET OutputRoot.XML.{tagName}.*[] = Environment.CIM.BankSvc.HostReqData.{tagName}.*[];

----------------------

Thanks in advance,
Ved
_________________
IBM Certified Solutions Expert - MQSeries Workflow
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
vedbhat
PostPosted: Fri Jul 28, 2006 12:48 am    Post subject: Reply with quote

Disciple

Joined: 19 Mar 2002
Posts: 186
Location: Singapore

If the Input Message is in the Format shown below and after parsing the message, as XML in the input node, the indentatation is saved (Tabs and Line Feeds) as follows:

<?xml version="1.0"?>
<!DOCTYPE Order SYSTEM "Order.dtd">
<Order>
<ItemNo>1</ItemNo>
<Quantity>2</Quantity>
</Order>


Problem - I am trying to copy the input XML tree from Output during which the indentation also gets copied. Is there any way to suppress or tell the parser to copy only XML.Elements/XML.Tags and not to copy XML.Whitespace.

Any views.

Thanks,
Ved
_________________
IBM Certified Solutions Expert - MQSeries Workflow
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
elvis_gn
PostPosted: Fri Jul 28, 2006 1:29 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi vedbhat,

What tool are using to view these whitespaces ?

During debug, right before output are u seeing "\n" fields between the actual message fields ?

Please view your output in RFHUtil as char and tell us what u see...post it here too...

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri Jul 28, 2006 2:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Is there any way to suppress or tell the parser to copy only XML.Elements/XML.Tags and not to copy XML.Whitespace.
You've got a couple of options.
a) Walk the message tree (using a reference, of course) and remove all the whitespace nodes
b) Use the MRM XML format, which discards whitespace automatically ( but performance is not as good).

You don't say which domain you are using to parse your message, by the way.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Jul 28, 2006 5:33 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

If you are using MB V6 then you can use the XMLNSC domain which also throws away whitespace.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 28, 2006 5:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Good point. That's by far the best of the three options. I assumed that anyone who was on v6 would automatically be using XMLNSC.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Special Character after XML Tags
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.