public class HTMLEmitter extends XMLEmitter
characterSet, declarationIsWritten, empty, escaping, lastDisplayName, lastNameCode, lastPrefix, lastURI, openStartTag, preferHexlocator, namePool, outputProperties, outputStream, systemId, writerPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING| Constructor and Description |
|---|
HTMLEmitter()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Character data.
|
void |
endElement(int nameCode)
Output an element end tag.
|
protected static boolean |
isEmptyTag(String tag) |
static boolean |
isUrlAttribute(String element,
String attribute) |
void |
processingInstruction(String target,
String data)
Handle a processing instruction.
|
void |
startDocument()
Output start of document
|
void |
startElement(int nameCode,
Attributes atts,
int[] namespaces,
int nscount)
Output element start tag
|
protected void |
writeAttribute(int elCode,
String attname,
String type,
String value)
Write attribute name=value pair.
|
protected void |
writeEscape(char[] ch,
int start,
int length,
boolean inAttribute)
Escape characters.
|
closeStartTag, comment, emptyElementTagCloser, endDocument, outputCharacterReference, setDocumentLocator, setEscaping, setOutputProperties, setResult, setUnparsedEntity, testCharacters, testCharacters, writeDeclaration, writeDocTypegetNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setNamePool, setOutputStream, setSystemId, setWriter, usesWriterprotected static boolean isEmptyTag(String tag)
public void startDocument()
throws TransformerException
startDocument in class XMLEmitterTransformerExceptionpublic void startElement(int nameCode,
Attributes atts,
int[] namespaces,
int nscount)
throws TransformerException
startElement in class XMLEmitternamespaces - Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount - Number of significant entries within namespaces arrayTransformerExceptionprotected void writeAttribute(int elCode,
String attname,
String type,
String value)
throws TransformerException
writeAttribute in class XMLEmitterTransformerExceptionprotected void writeEscape(char[] ch,
int start,
int length,
boolean inAttribute)
throws IOException
writeEscape in class XMLEmitterch - The character array containing the stringstart - The start position of the input string within the character arraylength - The length of the input string within the character array
This method converts the XML special characters (such as < and &) into their
predefined entities.IOExceptionpublic void endElement(int nameCode)
throws TransformerException
endElement in class XMLEmittername - The element name (tag)TransformerExceptionpublic void characters(char[] ch,
int start,
int length)
throws TransformerException
characters in class XMLEmitterTransformerExceptionpublic void processingInstruction(String target, String data) throws TransformerException
processingInstruction in class XMLEmitterTransformerException