This is really about serialization of the output, not about how the XML is 
stored.  This should be controlled by the output options.  You can set those in 
the prolog with the xdmp:output option.   There are some changed that occurred 
to this in different releases.  In 4.2-7, I this defaults to

omit-xml-declaration = yes

and

indent-untyped = no

What version are you using (what is the output of xdmp:version() )?

http://docs.marklogic.com/4.2doc/docapp.xqy#display.xqy?fname=http://pubs/4.2doc/xml/xquery/langoverview.xml%2347415

Note that the options will not take effect if you are using cq because it 
performs evals, and it is only the outer query that cares about serialization.

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of aniruddha biswas
Sent: Friday, October 14, 2011 12:56 AM
To: marklogic dev
Subject: [MarkLogic Dev General] white space added while inserting xml into 
database

Hi All,

I am facing one problem while inserting XML into MarkLogic database. Some white 
space is getting added after inserting XML content into database. Please find 
below XML contents.

Before inserting into database XML was like this:

<a><b></b><c>test</c></a>

After inserting into database XML was like this:

<?xml version="1.0" encoding="UTF-8"?>
<a>
  <b/>
  <c>test</c>
</a>

Here colored cells are white space.

Is it any server configuration related issue? Please help me if you help any 
idea.

Thanks in advance,

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

Reply via email to