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');
    }
Renders this hit as xml. The default implementation will call the simpleRender()
hook. If it returns true, nothing more is done, otherwise the
given template set will be used for rendering.


@param writer      the XMLWriter to append this hit to
@throws java.io.IOException if rendering fails
container-search/src/main/java/com/yahoo/search/rendering/SyncDefaultRenderer.java