public void addContent(String content) {
        if (cachedTag != null) {
            cachedContent.add(XML.xmlEscape(content, false));
        } else if (tags.isEmpty()) {
            throw new IllegalStateException("There is no open tag to add content to.");
        } else {
            for (int i = 0; i < tags.size(); ++i) {
                writer.write(indent);
            }
            writer.write(XML.xmlEscape(content, false));
            writer.write('\n');
        }
    }
Add content to the last tag.

@param content the content to add to the last tag
document/src/main/java/com/yahoo/document/serialization/XmlStream.java