Methods Summary |
---|
public void | characters(char[] ch, int start, int length)Filter a character data event.
if (contentHandler != null) {
contentHandler.characters(ch, start, length);
}
|
public void | endDocument()Filter an end document event.
if (contentHandler != null) {
contentHandler.endDocument();
}
|
public void | endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)Filter an end element event.
if (contentHandler != null) {
contentHandler.endElement(uri, localName, qName);
}
|
public void | endPrefixMapping(java.lang.String prefix)Filter an end Namespace prefix mapping event.
if (contentHandler != null) {
contentHandler.endPrefixMapping(prefix);
}
|
public void | error(org.xml.sax.SAXParseException e)Filter an error event.
if (errorHandler != null) {
errorHandler.error(e);
}
|
public void | fatalError(org.xml.sax.SAXParseException e)Filter a fatal error event.
if (errorHandler != null) {
errorHandler.fatalError(e);
}
|
public org.xml.sax.ContentHandler | getContentHandler()Get the content event handler.
return contentHandler;
|
public org.xml.sax.DTDHandler | getDTDHandler()Get the current DTD event handler.
return dtdHandler;
|
public org.xml.sax.EntityResolver | getEntityResolver()Get the current entity resolver.
return entityResolver;
|
public org.xml.sax.ErrorHandler | getErrorHandler()Get the current error event handler.
return errorHandler;
|
public boolean | getFeature(java.lang.String name)Look up the value of a feature.
This will always fail if the parent is null.
if (parent != null) {
return parent.getFeature(name);
} else {
throw new SAXNotRecognizedException("Feature: " + name);
}
|
public org.xml.sax.XMLReader | getParent()Get the parent reader.
return parent;
|
public java.lang.Object | getProperty(java.lang.String name)Look up the value of a property.
if (parent != null) {
return parent.getProperty(name);
} else {
throw new SAXNotRecognizedException("Property: " + name);
}
|
public void | ignorableWhitespace(char[] ch, int start, int length)Filter an ignorable whitespace event.
if (contentHandler != null) {
contentHandler.ignorableWhitespace(ch, start, length);
}
|
public void | notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)Filter a notation declaration event.
if (dtdHandler != null) {
dtdHandler.notationDecl(name, publicId, systemId);
}
|
public void | parse(org.xml.sax.InputSource input)Parse a document.
setupParse();
parent.parse(input);
|
public void | parse(java.lang.String systemId)Parse a document.
parse(new InputSource(systemId));
|
public void | processingInstruction(java.lang.String target, java.lang.String data)Filter a processing instruction event.
if (contentHandler != null) {
contentHandler.processingInstruction(target, data);
}
|
public org.xml.sax.InputSource | resolveEntity(java.lang.String publicId, java.lang.String systemId)Filter an external entity resolution.
if (entityResolver != null) {
return entityResolver.resolveEntity(publicId, systemId);
} else {
return null;
}
|
public void | setContentHandler(org.xml.sax.ContentHandler handler)Set the content event handler.
contentHandler = handler;
|
public void | setDTDHandler(org.xml.sax.DTDHandler handler)Set the DTD event handler.
dtdHandler = handler;
|
public void | setDocumentLocator(org.xml.sax.Locator locator)Filter a new document locator event.
this.locator = locator;
if (contentHandler != null) {
contentHandler.setDocumentLocator(locator);
}
|
public void | setEntityResolver(org.xml.sax.EntityResolver resolver)Set the entity resolver.
entityResolver = resolver;
|
public void | setErrorHandler(org.xml.sax.ErrorHandler handler)Set the error event handler.
errorHandler = handler;
|
public void | setFeature(java.lang.String name, boolean value)Set the value of a feature.
This will always fail if the parent is null.
if (parent != null) {
parent.setFeature(name, value);
} else {
throw new SAXNotRecognizedException("Feature: " + name);
}
|
public void | setParent(org.xml.sax.XMLReader parent)Set the parent reader.
This is the {@link org.xml.sax.XMLReader XMLReader} from which
this filter will obtain its events and to which it will pass its
configuration requests. The parent may itself be another filter.
If there is no parent reader set, any attempt to parse
or to set or get a feature or property will fail.
this.parent = parent;
|
public void | setProperty(java.lang.String name, java.lang.Object value)Set the value of a property.
This will always fail if the parent is null.
if (parent != null) {
parent.setProperty(name, value);
} else {
throw new SAXNotRecognizedException("Property: " + name);
}
|
private void | setupParse()Set up before a parse.
Before every parse, check whether the parent is
non-null, and re-register the filter for all of the
events.
if (parent == null) {
throw new NullPointerException("No parent for filter");
}
parent.setEntityResolver(this);
parent.setDTDHandler(this);
parent.setContentHandler(this);
parent.setErrorHandler(this);
|
public void | skippedEntity(java.lang.String name)Filter a skipped entity event.
if (contentHandler != null) {
contentHandler.skippedEntity(name);
}
|
public void | startDocument()Filter a start document event.
if (contentHandler != null) {
contentHandler.startDocument();
}
|
public void | startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)Filter a start element event.
if (contentHandler != null) {
contentHandler.startElement(uri, localName, qName, atts);
}
|
public void | startPrefixMapping(java.lang.String prefix, java.lang.String uri)Filter a start Namespace prefix mapping event.
if (contentHandler != null) {
contentHandler.startPrefixMapping(prefix, uri);
}
|
public void | unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)Filter an unparsed entity declaration event.
if (dtdHandler != null) {
dtdHandler.unparsedEntityDecl(name, publicId, systemId,
notationName);
}
|
public void | warning(org.xml.sax.SAXParseException e)Filter a warning event.
if (errorHandler != null) {
errorHandler.warning(e);
}
|