| Modifier and Type | Field and Description |
|---|---|
| private boolean | m_dtdHandled
Handle document type declaration (for first element only) |
| protected boolean | m_escapeSetting
Keeps track of whether output escaping is currently enabled |
| Access | Constructor and Description |
|---|---|
| public | ToHTMLSAXHandler(ContentHandler
the wrapped SAX content handler handler, String the encoding of the output HTML document encoding)A constructor |
| public | ToHTMLSAXHandler(ContentHandler
the wrapped SAX content handler handler, LexicalHandler the wrapped lexical handler lex, String the encoding of the output HTML document encoding)A constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | attributeDecl(String
this parameter is ignored eName, String this parameter is ignored aName, String this parameter is ignored type, String this parameter is ignored valueDefault, String this parameter is ignored value)Implements org. Does nothing. |
| public void | characters(final String
The string of characters to process. chars)Overrides com. Implements com. Receive notification of character data. |
| public void | characters(char[]
The characters from the XML document. ch, int The start position in the array. off, int The number of characters to read from the array. len)Implements org. Receive notification of character data. |
| public void | close()
Overrides com. Implements com. Do nothing. |
| protected void | closeStartTag()
Overrides com. This method is called when all the data needed for a call to the SAX handler's startElement() method has been gathered. |
| public void | comment(char[]
An array holding the characters in the comment. ch, int The starting position in the array. start, int The number of characters to use from the array. length)Implements org. Receive notification of a comment anywhere in the document. |
| public void | elementDecl(String name, String model)
Implements org. Does nothing. |
| public void | |
| public void | endDocument()
Implements org. Receive notification of the end of a document. |
| public void | |
| public void | endElement(String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. uri, String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, String The qualified name (with prefix), or the
empty string if qualified names are not available. qName)Implements org. Receive notification of the end of an element. |
| public void | endElement(String
The element type name elementName)Implements com. Receive notification of the end of an element. |
| public void | endPrefixMapping(String prefix)
Implements org. Does nothing. |
| public void | externalEntityDecl(String arg0, String arg1, String arg2)
Implements org. Report a parsed external entity declaration. |
| public void | flushPending()
Overrides com. Implements com. This method flushes any pending events, which can be startDocument() closing the opening tag of an element, or closing an open CDATA section. |
| public Properties | Returns: nullImplements com. Returns null. |
| public OutputStream | Returns: nullImplements com. Reurns null |
| public Writer | Returns: nullImplements com. Returns null |
| public void | ignorableWhitespace(char[] ch, int start, int length)
Implements org. Does nothing. |
| public void | |
| public void | internalEntityDecl(String name, String value)
Implements org. Does nothing. |
| public void | namespaceAfterStartElement(final String
the prefix associated with the given URI. prefix, final String the URI of the namespace uri)Overrides com. Implements com. This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). |
| public void | processingInstruction(String
The processing instruction target. target, String The processing instruction data, or null if
none was supplied. data)Overrides com. Implements org. Receive notification of a processing instruction. |
| public boolean | Returns: true if the class was successfuly reset.Overrides com. Implements com. Try's to reset the super class and reset this class for re-use, so that you don't need to create a new serializer (mostly for performance reasons). |
| private void | |
| public void | serialize(Node node)
Implements com. Does nothing. |
| public void | setDocumentLocator(Locator arg0)
Overrides com. Implements org. Does nothing. |
| public boolean | setEscaping(boolean
true if escaping is to be set on. escape)Implements com. Turns special character escaping on/off. |
| public void | setIndent(boolean
the number of spaces to indent per indentation level
(ignored) indent)Overrides com. Implements com. Does nothing |
| public void | setOutputFormat(Properties
this parameter is not used format)Implements com. Does nothing. |
| public void | setOutputStream(OutputStream
this parameter is ignored output)Implements com. Does nothing. |
| public void | setWriter(Writer
this parameter is ignored. writer)Implements com. Does nothing. |
| public void | |
| public void | |
| public void | startElement(String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. namespaceURI, String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, String The elements name. qName, Attributes The attributes attached to the element, if any. atts)Overrides com. Implements org. Receive notification of the beginning of an element, although this is a SAX method additional namespace or attribute information can occur before or after this call, that is associated with this element. |
| public void | startElement(String
the URI of the namespace of the element
(optional) elementNamespaceURI, String the element name, but without prefix
(optional) elementLocalName, String the element name, with prefix, if any (required) elementName)Overrides com. Implements com. An element starts, but attributes are not fully known yet. |
| public void | startElement(String
the element name, with prefix, if any elementName)Overrides com. Implements com. An element starts, but attributes are not fully known yet. |
| public void | |
| public boolean | Returns: returns true if the call made a change to the current namespace information, false if it did not change anything, e.g. if the prefix/namespace mapping was already in scope from before.The Namespace prefix being declared. prefix, String The Namespace URI the prefix is mapped to. uri, boolean true if any open tags need to be closed first, this
will impact which element the mapping applies to (open parent, or its up
comming child) shouldFlush)Implements com. Handle a prefix/uri mapping, which is associated with a startElement() that is soon to follow. |
| public void | startPrefixMapping(String
The Namespace prefix being declared. prefix, String The Namespace URI the prefix is mapped to. uri)Implements org. Begin the scope of a prefix-URI Namespace mapping just before another element is about to start. |
| m_dtdHandled | back to summary |
|---|---|
| private boolean m_dtdHandled Handle document type declaration (for first element only) | |
| m_escapeSetting | back to summary |
|---|---|
| protected boolean m_escapeSetting Keeps track of whether output escaping is currently enabled | |
| ToHTMLSAXHandler | back to summary |
|---|---|
| public ToHTMLSAXHandler(ContentHandler handler, String encoding) A constructor
| |
| ToHTMLSAXHandler | back to summary |
|---|---|
| public ToHTMLSAXHandler(ContentHandler handler, LexicalHandler lex, String encoding) A constructor.
| |
| attributeDecl | back to summary |
|---|---|
| public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException Implements org. Does nothing.
| |
| characters | back to summary |
|---|---|
| public void characters(final String chars) throws SAXException Overrides com. Implements com. Receive notification of character data.
| |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int off, int len) throws SAXException Implements org. Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information. The application must not attempt to read from the array outside of the specified range. Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).
| |
| close | back to summary |
|---|---|
| public void close() Overrides com. Implements com. Do nothing.
| |
| closeStartTag | back to summary |
|---|---|
| protected void closeStartTag() throws SAXException Overrides com. This method is called when all the data needed for a call to the SAX handler's startElement() method has been gathered. | |
| comment | back to summary |
|---|---|
| public void comment(char[] ch, int start, int length) throws SAXException Implements org. Receive notification of a comment anywhere in the document. This callback will be used for comments inside or outside the document element.
| |
| elementDecl | back to summary |
|---|---|
| public void elementDecl(String name, String model) throws SAXException Implements org. Does nothing.
| |
| endCDATA | back to summary |
|---|---|
| public void endCDATA() throws SAXException Implements org. Does nothing.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Implements org. Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.
| |
| endDTD | back to summary |
|---|---|
| public void endDTD() throws SAXException Implements org. Does nothing.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String localName, String qName) throws SAXException Implements org. Receive notification of the end of an element. The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty). If the element name has a namespace prefix, the prefix will still be attached to the name.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String elementName) throws SAXException Implements com. Receive notification of the end of an element.
| |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) throws SAXException Implements org. Does nothing.
| |
| externalEntityDecl | back to summary |
|---|---|
| public void externalEntityDecl(String arg0, String arg1, String arg2) throws SAXException Implements org. Doc from org. Report a parsed external entity declaration. Only the effective (first) declaration for each entity will be reported. If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
| |
| flushPending | back to summary |
|---|---|
| public void flushPending() throws SAXException Overrides com. Implements com. This method flushes any pending events, which can be startDocument() closing the opening tag of an element, or closing an open CDATA section. | |
| getOutputFormat | back to summary |
|---|---|
| public Properties getOutputFormat() Implements com. Returns null.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Implements com. Reurns null
| |
| getWriter | back to summary |
|---|---|
| public Writer getWriter() Implements com. Returns null
| |
| ignorableWhitespace | back to summary |
|---|---|
| public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException Implements org. Does nothing.
| |
| indent | back to summary |
|---|---|
| public void indent(int n) throws SAXException Does nothing. | |
| internalEntityDecl | back to summary |
|---|---|
| public void internalEntityDecl(String name, String value) throws SAXException Implements org. Does nothing.
| |
| namespaceAfterStartElement | back to summary |
|---|---|
| public void namespaceAfterStartElement(final String prefix, final String uri) throws SAXException Overrides com. Implements com. This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). startPrefixMapping(prefix,uri) would be used before the startElement() call.
| |
| processingInstruction | back to summary |
|---|---|
| public void processingInstruction(String target, String data) throws SAXException Overrides com. Implements org. Receive notification of a processing instruction. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element. A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.
| |
| reset | back to summary |
|---|---|
| public boolean reset() Overrides com. Implements com. Try's to reset the super class and reset this class for re-use, so that you don't need to create a new serializer (mostly for performance reasons).
| |
| resetToHTMLSAXHandler | back to summary |
|---|---|
| private void resetToHTMLSAXHandler() Reset all of the fields owned by ToHTMLSAXHandler class | |
| serialize | back to summary |
|---|---|
| public void serialize(Node node) throws IOException Implements com. Does nothing.
| |
| setDocumentLocator | back to summary |
|---|---|
| public void setDocumentLocator(Locator arg0) Overrides com. Implements org. Does nothing. | |
| setEscaping | back to summary |
|---|---|
| public boolean setEscaping(boolean escape) throws SAXException Implements com. Turns special character escaping on/off.
| |
| setIndent | back to summary |
|---|---|
| public void setIndent(boolean indent) Overrides com. Implements com. Does nothing
| |
| setOutputFormat | back to summary |
|---|---|
| public void setOutputFormat(Properties format) Implements com. Does nothing.
| |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(OutputStream output) Implements com. Does nothing.
| |
| setWriter | back to summary |
|---|---|
| public void setWriter(Writer writer) Implements com. Does nothing.
| |
| skippedEntity | back to summary |
|---|---|
| public void skippedEntity(String arg0) throws SAXException Implements org. Does nothing.
| |
| startCDATA | back to summary |
|---|---|
| public void startCDATA() throws SAXException Implements org. Does nothing.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException Overrides com. Implements org. Receive notification of the beginning of an element, although this is a SAX method additional namespace or attribute information can occur before or after this call, that is associated with this element.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException Overrides com. Implements com. An element starts, but attributes are not fully known yet.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String elementName) throws SAXException Overrides com. Implements com. An element starts, but attributes are not fully known yet.
| |
| startEntity | back to summary |
|---|---|
| public void startEntity(String arg0) throws SAXException Implements org. Does nothing.
| |
| startPrefixMapping | back to summary |
|---|---|
| public boolean startPrefixMapping(String prefix, String uri, boolean shouldFlush) throws SAXException Implements com. Handle a prefix/uri mapping, which is associated with a startElement() that is soon to follow. Need to close any open start tag to make sure than any name space attributes due to this event are associated wih the up comming element, not the current one.
| |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) throws SAXException Implements org. Begin the scope of a prefix-URI Namespace mapping just before another element is about to start. This call will close any open tags so that the prefix mapping will not apply to the current element, but the up comming child.
| |