I have a situation where I want to use MXQuery Update to inject some text which contains special characters, for instance 

But after mxquery evaluates the expression, it is replacing this with a ' '. I would like for any special characters to be respected and not replaced automatically… is there a setting or something that can be set to allow this to happen?
thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
swopet was a former colleague of mine working on the same project. I am here to reopen this post as we are actually seeing it again now - but it's with insert only, not replace.
If we replace an attribute with text that has multiple new lines, everything is preserved ok.
<el Notes="some 
 existing notes" />
declare variable $newNote := "a note with 
 multiple 

 new lines";
replace value of node target//el/@Notes with $newNote
<el Notes="a note with 
 multiple 

 new lines" />
perfect. But if we do an insert
<el />
insert nodes attribute Notes {some notes with 
 multiple 

 new lines} into $target//el
we end up with
<el Notes="some notes with multiple new lines" />
The new lines are replaced with a space and consecutive spaces are collapsed into one. Any ideas why this is happening for insert only? Is there a setting or different syntax for this? Or does it look like a bug? I'd be happy to write up a simple junit test if that would help troubleshoot. Please advise.
Thanks,
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a situation where I want to use MXQuery Update to inject some text which contains special characters, for instance &#x0A;
But after mxquery evaluates the expression, it is replacing this with a ' '. I would like for any special characters to be respected and not replaced automatically… is there a setting or something that can be set to allow this to happen?
thanks!
this apears to be a non-issue… verified thru some junit tests, and appears to not be an issue with MXQuery evaluation.
Hi,
swopet was a former colleague of mine working on the same project. I am here to reopen this post as we are actually seeing it again now - but it's with insert only, not replace.
If we replace an attribute with text that has multiple new lines, everything is preserved ok.
<el Notes="some 
 existing notes" />
declare variable $newNote := "a note with 
 multiple 

 new lines";
replace value of node target//el/@Notes with $newNote
<el Notes="a note with 
 multiple 

 new lines" />
perfect. But if we do an insert
<el />
insert nodes attribute Notes {some notes with 
 multiple 

 new lines} into $target//el
we end up with
<el Notes="some notes with multiple new lines" />
The new lines are replaced with a space and consecutive spaces are collapsed into one. Any ideas why this is happening for insert only? Is there a setting or different syntax for this? Or does it look like a bug? I'd be happy to write up a simple junit test if that would help troubleshoot. Please advise.
Thanks,
John