public class ViewParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CRUX_VIEW_PREFIX |
| Constructor and Description |
|---|
ViewParser(String viewId,
boolean escapeXML,
boolean indentOutput,
boolean xhtmlInput)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
extractCruxMetaData(Document view)
Extract the view metadata form the current document
|
void |
generateHTMLHostPage(Document cruxPageDocument,
Writer out)
Generates the HTML page from the given .crux.xml page.
|
public static final String CRUX_VIEW_PREFIX
public ViewParser(String viewId, boolean escapeXML, boolean indentOutput, boolean xhtmlInput) throws ViewParserException
escapeXML - If true will escape all inner text nodes to ensure that the generated outputs will be parsed correctly by a XML parser.indentOutput - True makes the generated outputs be indented.xhtmlInput - True if the given document represents a valid XHTML page. If false, parser will assume that the input is
composed by a root tag representing a the view.ViewParserExceptionpublic String extractCruxMetaData(Document view) throws ViewParserException
element - ViewParserExceptionpublic void generateHTMLHostPage(Document cruxPageDocument, Writer out) throws ViewParserException
viewId - The id of the screen associated with the .crux.xml page.cruxPageDocument - a XML Document representing the .crux.xml page.out - Where the generated HTML will be written.ViewParserExceptionCopyright © 2015. All rights reserved.