public static void printStringXml(StringFieldValue s, XmlStream xml) {
        String content = s.getString();
        if (containsNonPrintableCharactersString(content)) {
            byte[] bytecontent = Utf8.toBytes(content);
            xml.addAttribute("binaryencoding", "base64");
            xml.addContent(base64Encoder.encodeToString(bytecontent));
        } else {
            xml.addContent(content);
        }
    }
Date: Apr 17, 2008

@author <a href="mailto:humbe@yahoo-inc.com">H&aring;kon Humberset</a>
document/src/main/java/com/yahoo/document/serialization/XmlSerializationHelper.java