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 » Adding non-printing characters in XML data

Post new topic  Reply to topic
 Adding non-printing characters in XML data « View previous topic :: View next topic » 
Author Message
Getson
PostPosted: Thu Jan 24, 2002 2:14 pm    Post subject: Reply with quote

Newbie

Joined: 17 Jul 2001
Posts: 9
Location: Toronto, Canada

Does anybody know how to add a non-printing character to data in an XML field using ESQL?
I would like to insert a linefeed character into my data and so tried this code:
SET OutputRoot.XML.Msg = 'First line' || CAST(0X0A AS CHAR) || 'second line';

(the ASCII linefeed character is x0A or the 10th character of the set)
what I received was:
<Msg>First line10second line</Msg>

I think I can do it by manipulating the message as a BLOB but that is significantly more work.
Does anyone have another approach?

D
Back to top
View user's profile Send private message MSN Messenger
amigupta1978
PostPosted: Thu Jan 24, 2002 2:40 pm    Post subject: Reply with quote

Centurion

Joined: 22 Jan 2002
Posts: 132
Location: India

hi..
u can try using Root.XML.TAGNAME.(XML.CDataSection)=ur spl characters.

amit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Getson
PostPosted: Thu Jan 24, 2002 4:11 pm    Post subject: Reply with quote

Newbie

Joined: 17 Jul 2001
Posts: 9
Location: Toronto, Canada

Thanks but no go. I got the same result.
The issue here is that ESQL converts the hex value to an integer instead of interpreting it as an ASCII character.
I did get this to work by converting the message to BLOB and concatenating the linefeed (x0A) character in the BLOB data. A pain, but it worked.
Other ideas are always welcome.
Back to top
View user's profile Send private message MSN Messenger
mpuetz
PostPosted: Fri Jan 25, 2002 7:11 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

How about this ?

DECLARE linefeed CHAR;

SET linefeed = '
';

SET OutputRoot.XML.text = '1st line' || linefeed || '2nd line';


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
lbrett
PostPosted: Fri Jan 25, 2002 1:37 pm    Post subject: Reply with quote

Novice

Joined: 24 Jan 2002
Posts: 20

Hi,

You can also try using the asis tag.

SET OutputRoot.XML.Msg.(XML.AsisElementContent) = 'First line' || CAST(0X0A AS CHAR) || 'second line';

Regards
Back to top
View user's profile Send private message
MiLi
PostPosted: Fri Jan 27, 2006 1:02 am    Post subject: Can someone post a solution Reply with quote

Acolyte

Joined: 07 Oct 2005
Posts: 51

Hi

I'm intrested if someone got a solution?
Back to top
View user's profile Send private message
MiLi
PostPosted: Fri Jan 27, 2006 2:12 am    Post subject: Solution Reply with quote

Acolyte

Joined: 07 Oct 2005
Posts: 51

I found a solution from another thread

Code:

      DECLARE CR CHAR CAST(CAST(X'0A' AS BLOB) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId );
      DECLARE LF CHAR CAST(CAST(X'0D' AS BLOB) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId );
      DECLARE CRLF CHAR LF ||CR;

SET Environment.ExceptionString = OVERLAY(ExceptionString PLACING CRLF FROM (lineBrakePossition) FOR 0);


Enjoy
_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Instructor - WebSphere MQ, WebSphere Message Broker
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 » Adding non-printing characters in XML data
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.