Hello,

I had some expierence of this of my own. Saxon and other XML tools are better at guessing what the user wants. Probably there is an option (CHOP?) that one can set to tell BaseX not to trim whitespace at the edges of text nodes. But to my knowledge the standard way is to add @xml:space="preserve" to the outermost element where this is necessary. That's how I do it.

<text xml:space='preserve'> test for <element/> me </text>

Best regards

Omar Siam

Am 09.12.2019 um 16:32 schrieb Arjan Loeffen:
Dear BaseX People,

after many (happy!) projects using BaseX I have found that

curl -i -X PUT --basic --user admin ^
   -H "Content-Type: application/xml" -d "<text> test for <element/> me </text>" "http://localhost:8984/rest/LeapinLists/test.xml";

stores

<text>test for<element/>me</text>

To the database. Notice the spaces in the XML string. What may have caused this behavior? Any suggestions on what to do here?

I tried it on Basex 9.3, the latest edition right now.

--
*Arjan Loeffen*
Armatiek BV & Armatiek Solutions BV
06-12918997

Reply via email to