I wonder how ML stores the uploaded XML document internally. As it will do the universal index for both the content and structure (XML element), will that compact the XML document to remove all those original XML element indentations and line breaks?
Some of my XML elements are for people to edit, and some elements are for machines to process. The above two distinct special use cases require handling different elements in different ways. Some need to have a pretty format XML element, including its subsibling ones. While another element will need to have a compact XML element.
How to deal with with MarkLogic?
My first question is how to see the true xml content inside the content database. I realize that I could not use fn:doc() to view the XML from the output, as it will try to represent the content in the node structure again. I wonder whether I could view the true xml content by
mlcp exportwithindented = 'false'.If any XML file will always get minification internally while storing in ml content, that means we will always get the customized indentation and line break behaviour lost. If that is the case, I should save both the xml and its zip format as binary into ML. I could use the zip format to preserve that customized indentation and line break.
Here is one sample desired xml. See b and c element.
<a>
<b>
<b1>
</b1>
</b>
<c><d></d><e></e></c>
</a>