I have a need to convert a string that has an ampersand into xml and I can't get it to work. I have tried encoding the ampersand, but none of them seem to work. The string is coming from a system external to MarkLogic and it can be changed (if that will help).
xquery version "1.0-ml"; declare namespace html = "http://www.w3.org/1999/xhtml"; (:let $testString1 := "<root>foo & bar</root>":) let $testString2 := "<root>foo & bar</root>" let $testString3 := "<root>foo & bar</root>" let $testString4 := "<root>foo %26 bar</root>" let $testString5 := "<root>foo & bar</root>" let $testString6 := "<root>foo & bar</root>" let $testString7 := "<root>foo %26 bar</root>" return xdmp:unquote($testString5) Maybe there is another way to convert the string into xml? I'm using MarkLogic 5.0-3.3 Thanks David
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
