public static String xmlEscape(String string, boolean isAttribute, boolean escapeLowAscii) {
        return xmlEscape(string, isAttribute, escapeLowAscii, null, -1);
    }
Replaces the characters that need to be escaped with their corresponding character entities.
vespajlib/src/main/java/com/yahoo/text/XML.java