Raghu, MarkLogic does not store the actual characters in the markup - it stores an optimized version of the document and serializes it back out per the XML spec.
However, MarkLogic knows about the XHTML schema, which prohibits some self-closing tags like <span/>. If you put your content in the right namespace it should serialize in a way browsers accept. Try this query in queryConsole to see the difference between the XHTML namespace and xml that looks enough like XHTML to be rendered but is not actually xhtml: <div xmlns="http://www.w3.org/1999/xhtml"></div> , <div xmlns="http://foo"></div> In my version (6.0-2) the former serialized with an explicit close tag but the latter serializes as a self-closing tag. Yours, Damon -- Damon Feldman Sr. Principal Consultant, MarkLogic From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu Sent: Tuesday, February 12, 2013 6:48 PM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] storing a html 'as it is' in xml Hi All, Im trying to store a html with empty tags say <html> <span class="someclass"></span> <span class="someclass"> </span> <span class="someclass"></span> <span class="someclass">Some text</span> </html> After storing in marklogic I get <html> <span class="someclass"/> <span class="someclass"/> <span class="someclass"/> <span class="someclass">Some text</span> </html> It is also stripping the spaces and line breaks And this is causing issues while rendering as html in a few browsers Is there a way I can store it "as it is"?? I've tried declare boundary-space preserve; declare option xdmp:output "indent=no"; but still no luck OTHER THAN CDATA/ Binary is there any other way to do this? Any help is appreciated Thanks in advance! Raghu
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general