Hi Prasanth,

If you want angular brackets to be shown as angular brackets among the 
character data within HTML, you need to escape them. I think the easiest way of 
doing this in MarkLogic Server is using xdmp:quote 
(http://developer.marklogic.com/pubs/4.2/apidocs/Ext-5.html#xdmp:quote). It 
converts XML into its string representation. Upon streaming into the response, 
angular brackets and such are escaped automatically for you.

You might want to wrap it inside a PRE element as well, to allow showing 
white-space as-is..

Kind regards,
Geert

Van: [email protected] 
[mailto:[email protected]] Namens Prasanth V J
Verzonden: donderdag 7 april 2011 12:22
Aan: [email protected]
Onderwerp: [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