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 » line wrap in xml file

Post new topic  Reply to topic
 line wrap in xml file « View previous topic :: View next topic » 
Author Message
MBLearner
PostPosted: Tue Jul 04, 2006 11:06 pm    Post subject: line wrap in xml file Reply with quote

Novice

Joined: 20 Jan 2006
Posts: 23

Hi,

I would to like to create one xml file where values will be separated using line wrap. For example, in the following xml file the field <Data> will have '123' and '456' separated by line break, as follows
<Data>
123
456
</Data>
How do I achieve this using esql ?
SET OutputRoot.XML.Data = '123' || <br> || '456' is not working. The <br> tag is being displayed by the browser. Any suggestion?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 04, 2006 11:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Question: Why?

XML is not intended to be directly displayed & if it is there are many way to transform it (XSLT being an obvious choice) into HTML or another display format.

Please give more details of your requirement
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 05, 2006 1:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
values will be separated using line wrap
Please bear in mind that the XML specification is very clear about line breaks. They are always normalised to a single 0x0A. I hope that's the kind of line break you need
Back to top
View user's profile Send private message
MBLearner
PostPosted: Wed Jul 05, 2006 11:31 pm    Post subject: Reply with quote

Novice

Joined: 20 Jan 2006
Posts: 23

Thanks for the reply.
I am not sure how to implement line break in XML file using single 0x0A. Everything I write it's treated as character. Any help?
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Wed Jul 05, 2006 11:50 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Use CAST( <HexValue> AS CHAR CCSID value)
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
MBLearner
PostPosted: Thu Jul 06, 2006 12:01 am    Post subject: Reply with quote

Novice

Joined: 20 Jan 2006
Posts: 23

I tried with that also. Always taking char value of the Hex. Please note that this is within the XML message, not any TDS or CWF flat file message.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 06, 2006 12:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I'm still not clear what you're trying to achieve...?

(There may be a different & easier way of achieving the same effect you see)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 06, 2006 12:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

When I said this:
Quote:
Please bear in mind that the XML specification is very clear about line breaks. They are always normalised to a single 0x0A. I hope that's the kind of line break you need
...I was not instructing you to insert 0x0A into your XML character stream ( although you can if you want to). I was simply pointing out that if you insert any other kind of line break, the next XML processor to parse the document will replace it with 0x0A.
If you still don't understand my point, read this: http://www.w3.org/TR/REC-xml/#sec-line-ends
Back to top
View user's profile Send private message
MBLearner
PostPosted: Thu Jul 06, 2006 2:00 am    Post subject: Reply with quote

Novice

Joined: 20 Jan 2006
Posts: 23

I would like to insert a line wrap in the xml document. It may not appear as normal line wrap like other editors (XSL or HTML) but from esql i would like to insert CARRIAGE RETURN (#xD) and LINE FEED (#xA) in one of the XML fields. For example, If I have two strings like '123' and '456', I just would like to append these two strings in a xml field with a Carriage Return and Line Feed using the ESQL. How can that be achieved?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 06, 2006 2:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

MBLearner wrote:
I would like to insert a line wrap in the xml document. It may not appear as normal line wrap like other editors (XSL or HTML) but from esql i would like to insert CARRIAGE RETURN (#xD) and LINE FEED (#xA) in one of the XML fields. For example, If I have two strings like '123' and '456', I just would like to append these two strings in a xml field with a Carriage Return and Line Feed using the ESQL. How can that be achieved?


Okay, but I still don't see the purpose of control characters in the body of an XML tag.

Maybe I'm just being thicker than normal
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » line wrap in xml file
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.