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 » CRLF(x'0D0A) is changed to LF(x'0A) in Environment tree

Post new topic  Reply to topic
 CRLF(x'0D0A) is changed to LF(x'0A) in Environment tree « View previous topic :: View next topic » 
Author Message
Yanghui
PostPosted: Thu Jul 03, 2003 7:52 am    Post subject: CRLF(x'0D0A) is changed to LF(x'0A) in Environment tree Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Hi,

I am using XML domain in WMQI2.1+CSD4 on W2K. I got a strange problem of using Environement tree. In my message flow, the whole incoming XML is made a copy into the environment tree. I found each CR(x'0D) would be taken away for those XML element values with CRLF in it. Does anybody have any idea what's happening here? Why has Environment tree changed the value of XML elements? I don't think there is any data conversion problem since everything is on W2K.

Many thanks in advance.

Regards

-Yanghui
Back to top
View user's profile Send private message Send e-mail
Craig B
PostPosted: Thu Jul 03, 2003 8:51 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

I do not believe that it is the copying of your XML message to the Environment tree that is changing the x'0D0A' to just x'0A'. To copy the XML message tree to the Environment tree then the XML parser would have had to parse the message bitstream to create the XML message tree. The XML specification (section 2.11) states that x'0D0A' characters will be normalised into x'0A' characters, and so your carriage returns are removed. Therefore the XML parser is working as designed when it does this.

It should also be noted that if the message flow does not change the message tree during a flow, and then an MQOutput node is encountered, then a new output message is not created and it just uses the same one that came in. In this scenario the output message would be as though the XML parser never parsed it, so you would get your carriage returns and line feed characters preserved in the output message.
_________________
Regards
Craig
Back to top
View user's profile Send private message
Yanghui
PostPosted: Thu Jul 03, 2003 9:55 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Thanks a lot for your response. It does make sense.

Unfortunately my incoming XML tree won't stay after the copy is made in the Environment tree. And also before a final message reaches an MQOutput node, msgflow working domain has been changed many times. What I need here is correct values in incoming XML.

So, if the x'0D0A' is supposed to be changed to x'0A' after using generic XML parser, then it seems I have to change x'0A' back to x'0D0A' in the copy before the value is employed in the message processing. Is my understanding correct? Is there a better way of dealing with this?

Thanks againg

-Yanghui
Back to top
View user's profile Send private message Send e-mail
Michael Dag
PostPosted: Thu Jul 03, 2003 11:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

are the CRLF's within the data? then you can prevent this by using the CDATA section of XML this will leave the content of your XML data untoched.

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Yanghui
PostPosted: Fri Jul 04, 2003 1:06 am    Post subject: Reply with quote

Disciple

Joined: 08 May 2002
Posts: 151
Location: Dublin, Ireland

Thanks for your response.

Yes. Those CRLFs are within the data.

My understanding about XML CDATA section is for those string which could be mis-recongized as markup. I am not sure if how easy for source application to generate XML with CDATA section in it. For sure it's an option but to me it's a kind of using cow knife to deal with chicken. What do you think? Any more suggestion? Thanks again.

Regards

-Yanghui
Back to top
View user's profile Send private message Send e-mail
Michael Dag
PostPosted: Fri Jul 04, 2003 4:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

There are always more sides to a story, so what are those CRLF's doing in your data anyway, if it is free text then the receiver should decide how to format the data to fit into their text fields, if is meant to distinguish between lines in an address for example (so formatted data) then the XML should reflect that (i.e. LineItem)

just my 2 cents, If you don't want the parser to manupulate your data use CDATA and you can still use the data for other purposes.

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CRLF(x'0D0A) is changed to LF(x'0A) in Environment tree
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.