|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.xml.CommentHandler
public class CommentHandler
The comment handler is used to collect all XML comments from the SAX parser. The parser implementation must support comments to make this feature work.
Field Summary | |
---|---|
static java.lang.String |
CLOSE_TAG_COMMENT
A constant marking a comment on the closing tag. |
static java.lang.String |
OPEN_TAG_COMMENT
A constant marking a comment on the opening tag. |
Constructor Summary | |
---|---|
CommentHandler()
DefaultConstructor. |
Method Summary | |
---|---|
void |
clearComments()
Clears all comments. |
void |
comment(char[] ch,
int start,
int length)
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. |
java.lang.String[] |
getComments()
Returns all collected comments as string array. |
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 some internal and external XML entities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPEN_TAG_COMMENT
public static final java.lang.String CLOSE_TAG_COMMENT
Constructor Detail |
---|
public CommentHandler()
Method Detail |
---|
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
This method is empty.
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
- The application may raise an
exception.endDTD()
,
startEntity(String)
public void endDTD() throws org.xml.sax.SAXException
This method is empty.
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
This method is empty.
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 '%', and if it is the
external DTD subset, it will be "[dtd]".
org.xml.sax.SAXException
- The application may raise an exception.endEntity(String)
,
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)
,
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
This method is empty.
endEntity
in interface org.xml.sax.ext.LexicalHandler
name
- The name of the entity that is ending.
org.xml.sax.SAXException
- The application may raise an exception.startEntity(String)
public void startCDATA() throws org.xml.sax.SAXException
This method is empty.
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.endCDATA()
public void endCDATA() throws org.xml.sax.SAXException
This method is empty.
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- The application may raise an exception.startCDATA()
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).
comment
in interface org.xml.sax.ext.LexicalHandler
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.
org.xml.sax.SAXException
- The application may raise an exception.public java.lang.String[] getComments()
public void clearComments()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |