|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Receive notification of the logical content of a document.
Note: While in the SAX 2.0 spirit, this implementation is not fully compliant. Speed and footprint took precedence over what the author judged being details.
This is the main interface that most SAX applications
implement: if the application needs to be informed of basic parsing
events, it implements this interface and registers an instance with
the XML reader using the XmlReader.setContentHandler(superwaba.ext.xplat.xml.ContentHandler)
setContentHandler} method. The XML reader uses the instance to report
basic document-related events like the start and end of elements
and character data.
The order of events in this interface is very important, and mirrors the order of information in the document itself. For example, all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event.
| Method Summary | |
void |
characters(java.lang.String s)
Receive notification of character data. |
void |
comment(java.lang.String s)
Receive notification of comment data. |
void |
endElement(int tag)
Receive notification of the end of an element. |
void |
startElement(int tag,
AttributeList atts)
Receive notification of the beginning of an element. |
| Method Detail |
public void startElement(int tag,
AttributeList atts)
The XmlReader will invoke this method at the beginning of every
element in the XML document; there will be a corresponding
endElement event for every startElement event
(even when the element is empty). All of the element's content will be
reported, in order, before the corresponding endElement
event.
tag - tag identifier for this elementatts - The attributes list attached to the element.public void endElement(int tag)
The XMLReader 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).
tag - tag identifier for this elementpublic void characters(java.lang.String s)
The XMLReader will call this method to report each chunk of character data. This XMLReader implementation return all contiguous character data in a single chunk.
s - The string of characters from the XML document.public void comment(java.lang.String s)
The XMLReader will call this method to report each chunk of comments. This XMLReader implementation return all contiguous comment data in a single chunk.
s - The string of characters from the XML document.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||