java.xml.string(str)
The XML format reserves certain characters (including double-quote,
less-than sign, etc) for particular uses. To use these characters
within string values, they must be converted to special sequences of
characters. The function
java.xml.string
takes a vector of strings, and converts them into strings with the
XML quote sequences, as shown in the Examples section.
java.xml.string("bad characters: \"<hello & Goodbye>\"") # returns the following: # [1] "bad characters: "<hello & Goodbye>""