org.apache.xml.serializer
public final class ToHTMLSAXHandler extends ToSAXHandler
UNKNOWN: internal
Constructor Summary | |
---|---|
ToHTMLSAXHandler(ContentHandler handler, String encoding)
A constructor | |
ToHTMLSAXHandler(ContentHandler handler, LexicalHandler lex, String encoding)
A constructor. |
Method Summary | |
---|---|
void | attributeDecl(String eName, String aName, String type, String valueDefault, String value)
Does nothing.
|
void | characters(String chars)
Receive notification of character data.
|
void | characters(char[] ch, int off, int len)
Receive notification of character data.
|
void | close()
Do nothing. |
void | comment(char[] ch, int start, int length)
Receive notification of a comment anywhere in the document. |
void | elementDecl(String name, String model)
Does nothing. |
void | endCDATA()
Does nothing. |
void | endDocument()
Receive notification of the end of a document.
|
void | endDTD()
Does nothing. |
void | endElement(String uri, String localName, String qName)
Receive notification of the end of an element.
|
void | endElement(String elementName)
Receive notification of the end of an element. |
void | endPrefixMapping(String prefix)
Does nothing. |
void | externalEntityDecl(String arg0, String arg1, String arg2) |
void | flushPending()
This method flushes any pending events, which can be startDocument()
closing the opening tag of an element, or closing an open CDATA section. |
Properties | getOutputFormat()
Returns null. |
OutputStream | getOutputStream()
Reurns null |
Writer | getWriter()
Returns null |
void | ignorableWhitespace(char[] ch, int start, int length)
Does nothing. |
void | indent(int n)
Does nothing.
|
void | internalEntityDecl(String name, String value)
Does nothing.
|
void | namespaceAfterStartElement(String prefix, String uri)
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. |
void | processingInstruction(String target, String data)
Receive notification of a processing instruction.
|
boolean | reset()
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).
|
void | serialize(Node node)
Does nothing. |
void | setDocumentLocator(Locator arg0)
Does nothing. |
boolean | setEscaping(boolean escape)
Turns special character escaping on/off.
|
void | setIndent(boolean indent)
Does nothing |
void | setOutputFormat(Properties format)
Does nothing. |
void | setOutputStream(OutputStream output)
Does nothing. |
void | setWriter(Writer writer)
Does nothing. |
void | skippedEntity(String arg0)
Does nothing. |
void | startCDATA()
Does nothing. |
void | startElement(String namespaceURI, String localName, String qName, Attributes atts)
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.
|
void | startElement(String elementNamespaceURI, String elementLocalName, String elementName)
An element starts, but attributes are not fully known yet.
|
void | startElement(String elementName)
An element starts, but attributes are not fully known yet.
|
void | startEntity(String arg0)
Does nothing. |
boolean | startPrefixMapping(String prefix, String uri, boolean shouldFlush)
Handle a prefix/uri mapping, which is associated with a startElement()
that is soon to follow. |
void | startPrefixMapping(String prefix, String uri)
Begin the scope of a prefix-URI Namespace mapping
just before another element is about to start.
|
Parameters: handler the wrapped SAX content handler encoding the encoding of the output HTML document
Parameters: handler the wrapped SAX content handler lex the wrapped lexical handler encoding the encoding of the output HTML document
Parameters: eName this parameter is ignored aName this parameter is ignored type this parameter is ignored valueDefault this parameter is ignored value this parameter is ignored
See Also: org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String,String,String)
Parameters: chars The string of characters to process.
Throws: org.xml.sax.SAXException
See Also: characters
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).
Parameters: ch The characters from the XML document. off The start position in the array. len The number of characters to read from the array.
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. org.xml.sax.SAXException
See Also: ToHTMLSAXHandler org.xml.sax.Locator
org.xml.sax.ContentHandler#characters(char[], int, int)
See Also: close
Parameters: ch An array holding the characters in the comment. start The starting position in the array. length The number of characters to use from the array.
Throws: org.xml.sax.SAXException The application may raise an exception.
See Also: org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
See Also: org.xml.sax.ext.DeclHandler#elementDecl(String, String)
See Also: org.xml.sax.ext.LexicalHandler#endCDATA()
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.
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. org.xml.sax.SAXException
See Also: org.xml.sax.ext.LexicalHandler#endDTD()
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.
Parameters: uri The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed. localName The local name (without prefix), or the empty string if Namespace processing is not being performed. qName The qualified name (with prefix), or the empty string if qualified names are not available.
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
See Also: org.xml.sax.ContentHandler#endElement(String, String, String)
Parameters: elementName The element type name
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
See Also: endElement
See Also: org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String)
Returns: null
See Also: getOutputFormat
Returns: null
See Also: getOutputStream
Returns: null
See Also: getWriter
See Also: org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
See Also: org.xml.sax.DTDHandler#unparsedEntityDecl
Parameters: prefix the prefix associated with the given URI. uri the URI of the namespace
See Also: ExtendedContentHandler
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.
Parameters: target The processing instruction target. data The processing instruction data, or null if none was supplied.
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. org.xml.sax.SAXException
See Also: org.xml.sax.ContentHandler#processingInstruction(String, String)
Returns: true if the class was successfuly reset.
See Also: reset
See Also: serialize
See Also: org.xml.sax.ContentHandler#setDocumentLocator(Locator)
Parameters: escape true if escaping is to be set on.
See Also: SerializationHandler
Parameters: indent the number of spaces to indent per indentation level (ignored)
See Also: SerializationHandler
Parameters: format this parameter is not used
See Also: setOutputFormat
Parameters: output this parameter is ignored
See Also: setOutputStream
Parameters: writer this parameter is ignored.
See Also: setWriter
See Also: org.xml.sax.ContentHandler#skippedEntity(String)
See Also: org.xml.sax.ext.LexicalHandler#startCDATA()
Parameters: namespaceURI The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed. localName The local name (without prefix), or the empty string if Namespace processing is not being performed. qName The elements name. atts The attributes attached to the element, if any.
Throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. org.xml.sax.SAXException
See Also: org.xml.sax.ContentHandler#startElement org.xml.sax.ContentHandler#endElement org.xml.sax.AttributeList
org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
Parameters: elementNamespaceURI the URI of the namespace of the element (optional) elementLocalName the element name, but without prefix (optional) elementName the element name, with prefix, if any (required)
See Also: startElement
Parameters: elementName the element name, with prefix, if any
See Also: startElement
See Also: org.xml.sax.ext.LexicalHandler#startEntity(String)
Parameters: prefix The Namespace prefix being declared. uri The Namespace URI the prefix is mapped to. shouldFlush 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)
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.
Throws: org.xml.sax.SAXException The client may throw an exception during processing.
See Also: ExtendedContentHandler
Parameters: prefix The Namespace prefix being declared. uri The Namespace URI the prefix is mapped to.
Throws: org.xml.sax.SAXException The client may throw an exception during processing.
See Also: org.xml.sax.ContentHandler#startPrefixMapping