public class HTMLSerializingContentHandler extends PrettySerializingContentHandler
Writer
.The GNU Lesser General Public License for details.
Constructor and Description |
---|
HTMLSerializingContentHandler()
A formatting serializer that does not add whitespace to the document.
|
HTMLSerializingContentHandler(FormatType theFormat)
A formatting serializer that adds whitespace to the document according to
the specified
FormatType . |
HTMLSerializingContentHandler(FormatType theFormat,
Writer theWriter)
A formatting serializer that adds whitespace to the document according to
the specified
FormatType . |
Modifier and Type | Method and Description |
---|---|
protected String |
decorateAttributeName(String attrName) |
protected String |
decorateAttributeValue(String attrValue) |
protected String |
decorateCharacters(String characters) |
protected String |
decorateIndent(int indentLevel) |
protected String |
decorateTagName(String tagName) |
void |
endDocument() |
protected String |
getEmptyTagEnd() |
protected String |
getEndTagStart() |
protected String |
getNewline() |
protected String |
getPIEnd() |
protected String |
getPIStart() |
protected String |
getTagEnd() |
protected String |
getTagStart() |
void |
startDocument() |
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, toString, write, write
public HTMLSerializingContentHandler()
public HTMLSerializingContentHandler(FormatType theFormat)
FormatType
. This uses a StringWriter and the
toString method will return its content.theFormat
- the formatting to usepublic HTMLSerializingContentHandler(FormatType theFormat, Writer theWriter)
FormatType
. As the document is serialized it
is written to the provided Writer
.theFormat
- the formatting to usetheWriter
- the writer to useprotected String decorateTagName(String tagName)
decorateTagName
in class PrettySerializingContentHandler
protected String decorateAttributeName(String attrName)
decorateAttributeName
in class PrettySerializingContentHandler
protected String decorateAttributeValue(String attrValue)
decorateAttributeValue
in class PrettySerializingContentHandler
protected String decorateCharacters(String characters)
decorateCharacters
in class PrettySerializingContentHandler
protected String decorateIndent(int indentLevel)
decorateIndent
in class PrettySerializingContentHandler
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class PrettySerializingContentHandler
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class PrettySerializingContentHandler
protected String getEmptyTagEnd()
getEmptyTagEnd
in class PrettySerializingContentHandler
protected String getEndTagStart()
getEndTagStart
in class PrettySerializingContentHandler
protected String getPIEnd()
getPIEnd
in class PrettySerializingContentHandler
protected String getPIStart()
getPIStart
in class PrettySerializingContentHandler
protected String getTagEnd()
getTagEnd
in class PrettySerializingContentHandler
protected String getTagStart()
getTagStart
in class PrettySerializingContentHandler
protected String getNewline()
getNewline
in class PrettySerializingContentHandler