Posted: Fri Mar 12, 2010 1:15 pm Post subject: Problem with Adding a new Line in Text
Apprentice
Joined: 18 Feb 2010 Posts: 40
I have a Message FLow which receives a XML message and store the
content of that message in a text file. I want to store each data in the XML
in a new line.
I referred the forum which discussed about adding new line to a e-mail output.
My ESQL looks like given below
DECLARE CR CHAR CAST(CAST('X''0A''' AS BLOB) AS CHAR );
SET L1 = 'Data1:'||Inputroot.XMLNSC.---.--||CR;
SET L2 = 'Data2:'||Inputroot.XMLNSC.---.--||CR;
SET FINAL = L1||L2;
I am not getting a newline in my output instead
I am getting all the message in a single line
I truly don't understand your requirement.
If you want to see each part on it's own line use a browser or XML viewer to look at the XML.
XML is not designed to be human readable but is machine readable / parsable. So this should be no news to you... On top of this if you are preparing the output for an email program it should probably have x0d0a (CRLF) in it... unless your mailer transforms the LF into CRLF... _________________ MQ & Broker admin
I am not getting a newline in my output instead
I am getting all the message in a single line
Are you quite sure about that? Many Windows-based text editors will not recognise a single LF ( 0x0A ) as a linefeed. That would make the entire file appear as a single line.
If my guess is correct, please note that there are plenty of free text editors that handle linefeeds intelligently.
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