I want to generate an XML document from data presented in a Notes view. The column formulas generate all of the XML tags necessary for the XML records and the $$ViewTemplate produces all of the correct XML tags to wrap up the document. Everything worked properly!
Until someone entered data into one of the text fields used in the view. The field was called Title and the offending value was “R&D Publications”. The ampersand in the title rendered the XML invalid.
What I really want is an @ formula called @HtmlEncode (and its partner @HtmlDecode) which would work in a way analogous to @UrlEncode and @UrlDecode. Occurrences of & would be translated to & and < would be translated to <. But, alas, such a function does not seem to exist.