private String asXML(Object value) {
        if (value == null)
            return "(null)";
        else if (value instanceof HitField)
            return ((HitField)value).quotedContent(false);
        else if (value instanceof StructuredData || value instanceof XMLString || value instanceof JSONString)
            return value.toString();
        else
            return XML.xmlEscape(value.toString(), false, '\u001f');
    }
Writes a hit's default attributes like 'type', 'source', 'relevance'.
container-search/src/main/java/com/yahoo/search/pagetemplates/result/PageTemplatesXmlRenderer.java