public class HtmlSerializer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AS_TEXT_BLANK
Indicates a non blank that can't be trimmed or reduced.
|
protected static String |
AS_TEXT_BLOCK_SEPARATOR
Indicates a block.
|
protected static String |
AS_TEXT_NEW_LINE
Indicates a new line.
|
protected static String |
AS_TEXT_TAB
Indicates a tab.
|
| Constructor and Description |
|---|
HtmlSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendApplet(StringBuilder builder,
HtmlApplet htmlApplet)
Process
HtmlApplet. |
protected void |
appendBreak(StringBuilder builder,
HtmlBreak htmlBreak)
Process
HtmlBreak. |
protected void |
appendChildren(StringBuilder builder,
DomNode node)
Iterate over all Children and call appendNode() for every.
|
protected void |
appendComment(StringBuilder builder,
DomComment domComment)
Process
DomComment. |
protected void |
appendDomNode(StringBuilder builder,
DomNode domNode)
Process
HtmlHiddenInput. |
protected void |
appendHiddenInput(StringBuilder builder,
HtmlHiddenInput htmlHiddenInput)
Process
HtmlHiddenInput. |
protected void |
appendInlineFrame(StringBuilder builder,
HtmlInlineFrame htmlInlineFrame)
Process
HtmlInlineFrame. |
protected void |
appendInput(StringBuilder builder,
HtmlInput htmlInput)
Process
HtmlInput. |
protected void |
appendNode(StringBuilder builder,
DomNode node)
The core distribution method call the different appendXXX
methods depending on the type of the given node.
|
protected void |
appendNoFrames(StringBuilder builder,
HtmlNoFrames htmlNoFrames)
Process
HtmlNoFrames. |
protected void |
appendNoScript(StringBuilder builder,
HtmlNoScript htmlNoScript)
Process
HtmlNoScript. |
protected void |
appendOrderedList(StringBuilder builder,
HtmlOrderedList htmlOrderedList)
Process
HtmlOrderedList taking care to numerate it. |
protected void |
appendPreformattedText(StringBuilder builder,
HtmlPreformattedText htmlPreformattedText)
Process
HtmlPreformattedText. |
protected void |
appendResetInput(StringBuilder builder,
HtmlResetInput htmlResetInput)
Process
HtmlResetInput. |
protected void |
appendScript(StringBuilder builder,
HtmlScript htmlScript)
Process
HtmlScript. |
protected void |
appendSelect(StringBuilder builder,
HtmlSelect htmlSelect)
Process
HtmlSelect. |
protected void |
appendStyle(StringBuilder builder,
HtmlStyle htmlStyle)
Process
HtmlStyle. |
protected void |
appendSubmitInput(StringBuilder builder,
HtmlSubmitInput htmlSubmitInput)
Process
HtmlSubmitInput. |
protected void |
appendTable(StringBuilder builder,
HtmlTable htmlTable)
Process
HtmlTable. |
protected void |
appendTableRow(StringBuilder builder,
HtmlTableRow htmlTableRow)
Process
HtmlTableRow. |
protected boolean |
appendTableRows(StringBuilder builder,
List<HtmlTableRow> rows,
boolean first,
TableRowGroup skipParent1,
TableRowGroup skipParent2)
Process
HtmlTableRow. |
protected void |
appendText(StringBuilder builder,
DomText domText)
Process
DomText. |
protected void |
appendTextArea(StringBuilder builder,
HtmlTextArea htmlTextArea)
Process
HtmlTextArea. |
protected void |
appendTitle(StringBuilder builder,
HtmlTitle htmlTitle)
Process
HtmlTitle. |
protected void |
appendUnorderedList(StringBuilder builder,
HtmlUnorderedList htmlUnorderedList)
Process
HtmlUnorderedList. |
String |
asText(DomNode node)
Converts an HTML node to text.
|
protected String |
cleanUp(String text)
Reduce the whitespace and do some more cleanup.
|
protected void |
doAppendCheckBoxInput(StringBuilder builder,
HtmlCheckBoxInput htmlCheckBoxInput)
Process
HtmlCheckBoxInput. |
protected void |
doAppendRadioButtonInput(StringBuilder builder,
HtmlRadioButtonInput htmlRadioButtonInput)
Process
HtmlRadioButtonInput. |
void |
setIgnoreMaskedElements(boolean ignore)
Indicates if element that are not displayed due to style settings
(visibility or display) should be visible in generated text.
|
protected static final String AS_TEXT_BLOCK_SEPARATOR
protected static final String AS_TEXT_NEW_LINE
protected static final String AS_TEXT_BLANK
protected static final String AS_TEXT_TAB
public String asText(DomNode node)
node - a nodeprotected String cleanUp(String text)
text - the text to clean upprotected void appendChildren(StringBuilder builder, DomNode node)
builder - the StringBuilder to add tonode - the node to processprotected void appendNode(StringBuilder builder, DomNode node)
builder - the StringBuilder to add tonode - the node to processprotected void appendDomNode(StringBuilder builder, DomNode domNode)
HtmlHiddenInput.builder - the StringBuilder to add todomNode - the target to processprotected void appendHiddenInput(StringBuilder builder, HtmlHiddenInput htmlHiddenInput)
HtmlHiddenInput.builder - the StringBuilder to add tohtmlHiddenInput - the target to processprotected void appendScript(StringBuilder builder, HtmlScript htmlScript)
HtmlScript.builder - the StringBuilder to add tohtmlScript - the target to processprotected void appendStyle(StringBuilder builder, HtmlStyle htmlStyle)
HtmlStyle.builder - the StringBuilder to add tohtmlStyle - the target to processprotected void appendNoScript(StringBuilder builder, HtmlNoScript htmlNoScript)
HtmlNoScript.builder - the StringBuilder to add tohtmlNoScript - the target to processprotected void appendNoFrames(StringBuilder builder, HtmlNoFrames htmlNoFrames)
HtmlNoFrames.builder - the StringBuilder to add tohtmlNoFrames - the target to processprotected void appendSubmitInput(StringBuilder builder, HtmlSubmitInput htmlSubmitInput)
HtmlSubmitInput.builder - the StringBuilder to add tohtmlSubmitInput - the target to processprotected void appendInput(StringBuilder builder, HtmlInput htmlInput)
HtmlInput.builder - the StringBuilder to add tohtmlInput - the target to processprotected void appendResetInput(StringBuilder builder, HtmlResetInput htmlResetInput)
HtmlResetInput.builder - the StringBuilder to add tohtmlResetInput - the target to processprotected void appendUnorderedList(StringBuilder builder, HtmlUnorderedList htmlUnorderedList)
HtmlUnorderedList.builder - the StringBuilder to add tohtmlUnorderedList - the target to processprotected void appendTitle(StringBuilder builder, HtmlTitle htmlTitle)
HtmlTitle.builder - the StringBuilder to add tohtmlTitle - the target to processprotected void appendTableRow(StringBuilder builder, HtmlTableRow htmlTableRow)
HtmlTableRow.builder - the StringBuilder to add tohtmlTableRow - the target to processprotected void appendTextArea(StringBuilder builder, HtmlTextArea htmlTextArea)
HtmlTextArea.builder - the StringBuilder to add tohtmlTextArea - the target to processprotected void appendTable(StringBuilder builder, HtmlTable htmlTable)
HtmlTable.builder - the StringBuilder to add tohtmlTable - the target to processprotected boolean appendTableRows(StringBuilder builder, List<HtmlTableRow> rows, boolean first, TableRowGroup skipParent1, TableRowGroup skipParent2)
HtmlTableRow.builder - the StringBuilder to add torows - the rowsfirst - if true this is the first oneskipParent1 - skip row if the parent is thisskipParent2 - skip row if the parent is thisprotected void appendSelect(StringBuilder builder, HtmlSelect htmlSelect)
HtmlSelect.builder - the StringBuilder to add tohtmlSelect - the target to processprotected void appendOrderedList(StringBuilder builder, HtmlOrderedList htmlOrderedList)
HtmlOrderedList taking care to numerate it.builder - the StringBuilder to add tohtmlOrderedList - the OL elementprotected void appendPreformattedText(StringBuilder builder, HtmlPreformattedText htmlPreformattedText)
HtmlPreformattedText.builder - the StringBuilder to add tohtmlPreformattedText - the target to processprotected void appendInlineFrame(StringBuilder builder, HtmlInlineFrame htmlInlineFrame)
HtmlInlineFrame.builder - the StringBuilder to add tohtmlInlineFrame - the target to processprotected void appendText(StringBuilder builder, DomText domText)
DomText.builder - the StringBuilder to add todomText - the target to processprotected void appendComment(StringBuilder builder, DomComment domComment)
DomComment.builder - the StringBuilder to add todomComment - the target to processprotected void appendApplet(StringBuilder builder, HtmlApplet htmlApplet)
HtmlApplet.builder - the StringBuilder to add tohtmlApplet - the target to processprotected void appendBreak(StringBuilder builder, HtmlBreak htmlBreak)
HtmlBreak.builder - the StringBuilder to add tohtmlBreak - the target to processprotected void doAppendCheckBoxInput(StringBuilder builder, HtmlCheckBoxInput htmlCheckBoxInput)
HtmlCheckBoxInput.builder - the StringBuilder to add tohtmlCheckBoxInput - the target to processprotected void doAppendRadioButtonInput(StringBuilder builder, HtmlRadioButtonInput htmlRadioButtonInput)
HtmlRadioButtonInput.builder - the StringBuilder to add tohtmlRadioButtonInput - the target to processpublic void setIgnoreMaskedElements(boolean ignore)
ignore - indicates if masked elements should be ignored or notCopyright © 2002–2019 Gargoyle Software Inc.. All rights reserved.