| Method from sax.XMLReaderBase Detail: |
public void characters(String data) throws SAXException {
char ch[] = data.toCharArray();
characters(ch, 0, ch.length);
}
Add a string of character data, with XML escaping.
This is a convenience method that takes an XML
String, converts it to a character array, then invokes
org.xml.sax.ContentHandler#characters . |
public void characters(char[] ch,
int start,
int length) throws SAXException {
if (contentHandler != null) {
contentHandler.characters(ch, start, length);
}
}
|
public void comment(char[] ch,
int start,
int length) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.comment(ch, start, length);
}
}
|
public void dataElement(String localName,
String content) throws SAXException {
dataElement("", localName, "", EMPTY_ATTS, content);
}
Add an element with character data content but no attributes
or Namespace URI.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. The method provides an empty string for the
Namespace URI, and empty string for the qualified name,
and an empty attribute list. It invokes
#dataElement(String, String, String, Attributes, String) }
directly. |
public void dataElement(String uri,
String localName,
String content) throws SAXException {
dataElement(uri, localName, "", EMPTY_ATTS, content);
}
Add an element with character data content but no qname or attributes.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. This method provides an empty string
for the qname and an empty attribute list. It invokes
#dataElement(String, String, String, Attributes, String) }
directly. |
public void dataElement(String localName,
Attributes atts,
String content) throws SAXException {
dataElement("", localName, "", atts, content);
}
Add an element with character data content but no Namespace URI or qname.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. The method provides an empty string for the
Namespace URI, and empty string for the qualified name. It invokes
#dataElement(String, String, String, Attributes, String) }
directly. |
public void dataElement(String uri,
String localName,
String qName,
Attributes atts,
String content) throws SAXException {
startElement(uri, localName, qName, atts);
characters(content);
endElement(uri, localName, qName);
}
|
public void emptyElement(String localName) throws SAXException {
emptyElement("", localName, "", EMPTY_ATTS);
}
Add an empty element without a Namespace URI, qname or attributes.
This method will supply an empty string for the qname,
and empty string for the Namespace URI, and an empty
attribute list. It invokes
#emptyElement(String, String, String, Attributes)
directly. |
public void emptyElement(String uri,
String localName) throws SAXException {
emptyElement(uri, localName, "", EMPTY_ATTS);
}
|
public void emptyElement(String localName,
Attributes atts) throws SAXException {
emptyElement("", localName, "", atts);
}
|
public void emptyElement(String uri,
String localName,
String qName,
Attributes atts) throws SAXException {
startElement(uri, localName, qName, atts);
endElement(uri, localName, qName);
}
|
public void endCDATA() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endCDATA();
}
}
|
public void endDTD() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endDTD();
}
}
|
public void endDocument() throws SAXException {
if (contentHandler != null) {
contentHandler.endDocument();
}
}
|
public void endElement(String localName) throws SAXException {
endElement("", localName, "");
}
End an element without a Namespace URI or qname.
This method will supply an empty string for the qName
and an empty string for the Namespace URI.
It invokes #endElement(String, String, String)
directly. |
public void endElement(String uri,
String localName) throws SAXException {
endElement(uri, localName, "");
}
|
public void endElement(String uri,
String localName,
String qName) throws SAXException {
if (contentHandler != null) {
contentHandler.endElement(uri, localName, qName);
}
}
|
public void endEntity(String name) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endEntity(name);
}
}
|
public void endPrefixMapping(String prefix) throws SAXException {
if (contentHandler != null) {
contentHandler.endPrefixMapping(prefix);
}
}
Sends end of namespace prefix mapping. |
public void error(SAXParseException e) throws SAXException {
if (errorHandler != null) {
errorHandler.error(e);
}
}
|
public void fatalError(SAXParseException e) throws SAXException {
if (errorHandler != null) {
errorHandler.fatalError(e);
}
}
|
public ContentHandler getContentHandler() {
return contentHandler;
}
Get the content event handler. |
public DTDHandler getDTDHandler() {
return dtdHandler;
}
Get the current DTD event handler. |
public EntityResolver getEntityResolver() {
return entityResolver;
}
Get the current entity resolver. |
public ErrorHandler getErrorHandler() {
return errorHandler;
}
Get the current error event handler. |
public boolean getFeature(String name) throws SAXNotSupportedException, SAXNotRecognizedException {
throw new SAXNotRecognizedException("Feature: " + name);
}
Look up the state of a feature.
This will always fail. |
public LexicalHandler getLexicalHandler() {
return lexicalHandler;
}
Get the current lexical handler. |
public Object getProperty(String name) throws SAXNotSupportedException, SAXNotRecognizedException {
for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) {
if (LEXICAL_HANDLER_NAMES[i].equals(name)) {
return getLexicalHandler();
}
}
throw new SAXNotRecognizedException("Property: " + name);
}
|
public void ignorableWhitespace(char[] ch,
int start,
int length) throws SAXException {
if (contentHandler != null) {
contentHandler.ignorableWhitespace(ch, start, length);
}
}
Sends ignorable whitespace. |
public void notationDecl(String name,
String publicId,
String systemId) throws SAXException {
if (dtdHandler != null) {
dtdHandler.notationDecl(name, publicId, systemId);
}
}
Add notation declaration. |
abstract public void parse(InputSource input) throws IOException, SAXException
Parse a document. Subclass must implement. |
public void parse(String systemId) throws IOException, SAXException {
parse(new InputSource(systemId));
}
|
public void processingInstruction(String target,
String data) throws SAXException {
if (contentHandler != null) {
contentHandler.processingInstruction(target, data);
}
}
Sends processing instruction. |
public InputSource resolveEntity(String publicId,
String systemId) throws SAXException {
if (entityResolver != null) {
try {
return entityResolver.resolveEntity(publicId, systemId);
}
catch (IOException ex) {
throw new SAXException(ex);
}
} else {
return null;
}
}
Resolves an external entity. |
public void setContentHandler(ContentHandler handler) {
if (handler == null) {
throw new NullPointerException("Null content handler");
} else {
contentHandler = handler;
}
}
Set the content event handler. |
public void setDTDHandler(DTDHandler handler) {
if (handler == null) {
throw new NullPointerException("Null DTD handler");
} else {
dtdHandler = handler;
}
}
Set the DTD event handler. |
public void setDocumentLocator(Locator locator) {
this.locator = locator;
if (contentHandler != null) {
contentHandler.setDocumentLocator(locator);
}
}
Assigns the document locator. |
public void setEntityResolver(EntityResolver resolver) {
if (resolver == null) {
throw new NullPointerException("Null entity resolver");
} else {
entityResolver = resolver;
}
}
|
public void setErrorHandler(ErrorHandler handler) {
if (handler == null) {
throw new NullPointerException("Null error handler");
} else {
errorHandler = handler;
}
}
Set the error event handler. |
public void setFeature(String name,
boolean state) throws SAXNotSupportedException, SAXNotRecognizedException {
throw new SAXNotRecognizedException("Feature: " + name);
}
Set the state of a feature.
This will always fail. |
public void setLexicalHandler(LexicalHandler handler) {
if (handler == null) {
throw new NullPointerException("Null lexical handler");
} else {
lexicalHandler = handler;
}
}
|
public void setProperty(String name,
Object value) throws SAXNotSupportedException, SAXNotRecognizedException {
for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) {
if (LEXICAL_HANDLER_NAMES[i].equals(name)) {
setLexicalHandler((LexicalHandler) value);
return;
}
}
throw new SAXNotRecognizedException("Property: " + name);
}
|
public void skippedEntity(String name) throws SAXException {
if (contentHandler != null) {
contentHandler.skippedEntity(name);
}
}
|
public void startCDATA() throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startCDATA();
}
}
|
public void startDTD(String name,
String publicId,
String systemId) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startDTD(name, publicId, systemId);
}
}
|
public void startDocument() throws SAXException {
if (contentHandler != null) {
contentHandler.startDocument();
}
}
|
public void startElement(String localName) throws SAXException {
startElement("", localName, "", EMPTY_ATTS);
}
Start a new element without a Namespace URI, qname, or attributes.
This method will provide an empty string for the
Namespace URI, and empty string for the qualified name,
and a default empty attribute list. It invokes
#startElement(String, String, String, Attributes)
directly. |
public void startElement(String uri,
String localName) throws SAXException {
startElement(uri, localName, "", EMPTY_ATTS);
}
|
public void startElement(String localName,
Attributes atts) throws SAXException {
startElement("", localName, "", atts);
}
|
public void startElement(String uri,
String localName,
String qName,
Attributes atts) throws SAXException {
if (contentHandler != null) {
contentHandler.startElement(uri, localName, qName, atts);
}
}
|
public void startEntity(String name) throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.startEntity(name);
}
}
|
public void startPrefixMapping(String prefix,
String uri) throws SAXException {
if (contentHandler != null) {
contentHandler.startPrefixMapping(prefix, uri);
}
}
Sends start of namespace prefix mapping. |
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName) throws SAXException {
if (dtdHandler != null) {
dtdHandler.unparsedEntityDecl(name, publicId, systemId,
notationName);
}
}
Add unparsed entity declaration. |
public void warning(SAXParseException e) throws SAXException {
if (errorHandler != null) {
errorHandler.warning(e);
}
}
|