|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.commons.schema.docpath.SaxWalkerOverDom
public final class SaxWalkerOverDom
Walks over a Document in a SAX style, notifying listeners with SAX
events.
Because the document has already been processed, only the following methods
in the ContentHandler will be called:
ContentHandler.startDocument()ContentHandler.startPrefixMapping(String, String)ContentHandler.startElement(String, String, String, Attributes)ContentHandler.characters(char[], int, int)ContentHandler.endElement(String, String, String)ContentHandler.endPrefixMapping(String)ContentHandler.endDocument()
| Constructor Summary | |
|---|---|
SaxWalkerOverDom()
Constructs a new SaxWalkerOverDom. |
|
SaxWalkerOverDom(ContentHandler contentHandler)
Constructs a new SaxWalkerOverDom with the provided
ContentHandler to send SAX events. |
|
SaxWalkerOverDom(List<ContentHandler> contentHandlers)
Constructs a new SaxWalkerOverDom, taking ownership of the
list of ContentHandlers to send events to. |
|
| Method Summary | |
|---|---|
void |
addContentHandler(ContentHandler contentHandler)
Adds the provided ContentHandler to the list of content handlers
to send events to. |
boolean |
removeContentHandler(ContentHandler contentHandler)
Removes the first instance of the provided ContentHandler from
the set of handlers to send events to. |
void |
walk(Document document)
Walks the provided Document, sending events to all of the
ContentHandlers as it traverses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SaxWalkerOverDom()
SaxWalkerOverDom.
public SaxWalkerOverDom(ContentHandler contentHandler)
SaxWalkerOverDom with the provided
ContentHandler to send SAX events.
contentHandler - The content handler to send events to.public SaxWalkerOverDom(List<ContentHandler> contentHandlers)
SaxWalkerOverDom, taking ownership of the
list of ContentHandlers to send events to.
contentHandlers - The list of content handlers to send events to.| Method Detail |
|---|
public void addContentHandler(ContentHandler contentHandler)
ContentHandler to the list of content handlers
to send events to. If this content handler was already added, it will be
sent events twice (or more often).
contentHandler - The content handler to send events to.public boolean removeContentHandler(ContentHandler contentHandler)
ContentHandler from
the set of handlers to send events to. If the content handler was added
more than once, it will continue to receive events.
contentHandler - The content handler to stop sending events to.
true if it was found, false if not.
public void walk(Document document)
throws SAXException
Document, sending events to all of the
ContentHandlers as it traverses. If there are no content
handlers, this method is a no-op.
document - The Document to traverse.systemId - The system ID of this Document.
SAXException - if an exception occurs when notifying the handlers.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||