@Deprecated
    public String toXML(String indent) {
        XmlStream xml = new XmlStream();
        xml.setIndent(indent);
        xml.beginTag("document");
        printXml(xml);
        xml.endTag();
        return xml.toString();
    }
This is an approximation of serialized size. We just set it to 4096 as a definition of a medium document.
@return Approximate size of document (4096)
document/src/main/java/com/yahoo/document/Document.java