Subject:Treatment of reserved characters in text Author:Jack Tan Date:01 Sep 2005 04:24 AM
I am new to XQUERY and I am trying to process large XML file containing text. Part of the text contains reserved characters such as "&". I want to remove "&" from the text. For example xml fragment has:
Subject:Treatment of reserved characters in text Author:(Deleted User) Date:01 Sep 2005 12:59 PM
Hi Jack,
you can use the fn:replace as in the previous example; you just need to keep in mind that "&" must be always represented as "&", and write
Subject:Treatment of reserved characters in text Author:Jack Tan Date:01 Sep 2005 01:48 PM
I tried this
let $rslt := fn:replace($txt, "[+()=<>|&*:-]"," ")
but, it comes back with an error: "Unrecognized character '"' (0x22)". Part of the expression is also highlighted red (Studio 6, rel. 3, build 377m).
So perhaps the question is: how can I enter the query so the evaluator will accept "&" as a part of string between "" rather than reserved character? Any control flags to properly configure the environment/engine?