|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.excalibur.xml.sax.ContentHandlerProxy org.apache.excalibur.xml.sax.XMLConsumerProxy
This class is an utility class proxying a SAX version 2.0
ContentHandler
and LexicalHandler
and forwarding it those
events received throug its XMLConsumer
s interface.
Constructor Summary | |
XMLConsumerProxy()
Create a new XMLConsumerProxy instance. |
|
XMLConsumerProxy(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
Create a new XMLConsumerProxy instance. |
|
XMLConsumerProxy(XMLConsumer xmlConsumer)
Create a new XMLConsumerProxy instance. |
Method Summary | |
void |
comment(char[] ch,
int start,
int len)
Report an XML comment anywhere in the document. |
void |
endCDATA()
Report the end of a CDATA section. |
void |
endDTD()
Report the end of DTD declarations. |
void |
endEntity(java.lang.String name)
Report the end of an entity. |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
Set the lexical handler |
void |
startCDATA()
Report the start of a CDATA section. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Report the start of DTD declarations, if any. |
void |
startEntity(java.lang.String name)
Report the beginning of an entity. |
Methods inherited from class org.apache.excalibur.xml.sax.ContentHandlerProxy |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Constructor Detail |
public XMLConsumerProxy(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)
XMLConsumerProxy
instance.
public XMLConsumerProxy()
XMLConsumerProxy
instance.
If you use this constructor, you have to set the content handler
by calling ContentHandlerProxy.setContentHandler(ContentHandler)
and the
lexical handler by calling setLexicalHandler(LexicalHandler)
.
Otherwise you get an NPE during streaming.
public XMLConsumerProxy(XMLConsumer xmlConsumer)
XMLConsumerProxy
instance.
Method Detail |
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
name
- The document type name.publicId
- The declared public identifier for the external DTD
subset, or null if none was declared.systemId
- The declared system identifier for the external DTD
subset, or null if none was declared.
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
name
- The name of the entity. If it is a parameter entity, the
name will begin with '%'.
org.xml.sax.SAXException
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
name
- The name of the entity that is ending.
org.xml.sax.SAXException
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
public void comment(char[] ch, int start, int len) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
ch
- An array holding the characters in the comment.start
- The starting position in the array.len
- The number of characters to use from the array.
org.xml.sax.SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |