| java.lang.Object org.jfree.xml.CommentHandler
CommentHandler | public class CommentHandler implements LexicalHandler(Code) | | 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.
author: Thomas Morgner |
Method Summary | |
public void | clearComments() Clears all comments. | public void | comment(char[] ch, int start, int length) Report an XML comment anywhere in the document.
This callback will be used for comments inside or outside the
document element, including comments in the external DTD
subset (if read). | public void | endCDATA() Report the end of a CDATA section. | public void | endDTD() Report the end of DTD declarations. | public void | endEntity(String name) Report the end of an entity. | public String[] | getComments() Returns all collected comments as string array. | public void | startCDATA() Report the start of a CDATA section. | public void | startDTD(String name, String publicId, String systemId) Report the start of DTD declarations, if any. | public void | startEntity(String name) Report the beginning of some internal and external XML entities.
This method is empty.
Parameters: name - The name of the entity. |
CLOSE_TAG_COMMENT | final public static String CLOSE_TAG_COMMENT(Code) | | A constant marking a comment on the closing tag.
|
OPEN_TAG_COMMENT | final public static String OPEN_TAG_COMMENT(Code) | | A constant marking a comment on the opening tag.
|
CommentHandler | public CommentHandler()(Code) | | DefaultConstructor.
|
clearComments | public void clearComments()(Code) | | Clears all comments.
|
comment | public void comment(char[] ch, int start, int length) throws SAXException(Code) | | Report an XML comment anywhere in the document.
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).
Parameters: ch - An array holding the characters in the comment. Parameters: start - The starting position in the array. Parameters: length - The number of characters to use from the array. exception: org.xml.sax.SAXException - The application may raise an exception. |
getComments | public String[] getComments()(Code) | | Returns all collected comments as string array.
the array containing all comments. |
startDTD | public void startDTD(String name, String publicId, String systemId) throws SAXException(Code) | | Report the start of DTD declarations, if any.
This method is empty.
Parameters: name - The document type name. Parameters: publicId - The declared public identifier for theexternal DTD subset, or null if none was declared. Parameters: systemId - The declared system identifier for theexternal DTD subset, or null if none was declared. exception: org.xml.sax.SAXException - The application may raise anexception. See Also: CommentHandler.endDTD() See Also: CommentHandler.startEntity(String) |
|
|