Prasanth,

I think your problem is actually with the way your browser is displaying the 
response that CQ sends back. If the browser interprets your code as html or XML 
it will render it using special rules. CQ in Firefox typically does what you 
see - shows the text as HTML, where, by spec, whitespace is normalized to a 
single space. CQ in IE will likely interpret as XML and show the markup with 
color coding on the element names and angle brackets. CQ sends different HTTP 
responses depending on the "xml" "text" and "html" buttons, which affect 
browser interpretation of the response.

If you want a browser to display a certain way, transform the text to an HTML 
page, with appropriate markup for newlines. But if the browser is not 
important, don't worry that CQ in a browser displays the newlines as spaces.

yours,
Damon
________________________________
From: [email protected] 
[[email protected]] On Behalf Of Prasanth V J 
[[email protected]]
Sent: Thursday, April 07, 2011 6:22 AM
To: [email protected]
Subject: [MarkLogic Dev General] Formatting issue

Hi,

I have an xml like follows

<test>abcd
efgh
ijkl
mnop
</test>

when i print this xml content on UI in a text area or run it in CQ in HTML 
format it will print as

abcd efgh ijkl mnop

instead i Need it in the same way as how the xml looks like(including new line 
character) like

abcd
efgh
ijkl
mnop

Is there any way to achieve this?

Regards,
Prasanth
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to