/** * Retrieves the current content for this object in String form. * If content has been retrieved in parse tree form and has * been edited, the String form is computed from the parse tree by * rendering it. It is <b>strongly</b> encouraged to avoid switching * between retrieval of parse tree (through {@code getParseTree}), * with subsequent edits and retrieval of String contents to avoid * repeated serialization and deserialization. * @return Renderable/active content. */ public String getContent() { if (content == null) { if (contentSource != null) { content = contentSource.responseString; // Clear on first use contentSource = null; } else if (document != null) { content = HtmlSerializer.serialize(document); } } return(content); }