public class HTMLElement extends Object
| Constructor and Description |
|---|
HTMLElement()
Constructor for HTML fragment.
|
HTMLElement(String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
HTMLElement |
addElement(String childText)
Add a child element.
|
void |
addText(String text)
Add child text.
|
String |
toHTML()
Return the HTML text.
|
String |
toString()
Override for debugging.
|
protected void |
toStringBuilder(StringBuilder buffer,
boolean html)
Write HTML to string buffer.
|
String |
toText()
Return a plain text version of the node.
|
public HTMLElement(String name)
name - Element name.public HTMLElement()
public final HTMLElement addElement(String childText)
childText - Child element name.public final void addText(String text)
text - The text value.protected final void toStringBuilder(StringBuilder buffer, boolean html)
buffer - The StringBuilder.html - true => format as HTML;
false => format as plain text.public String toText()
public String toHTML()
Copyright © 2000-2014. All Rights Reserved.