net.ontopia.xml
Class SAXTracker
java.lang.Object
org.xml.sax.helpers.DefaultHandler
net.ontopia.xml.SAXTracker
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Direct Known Subclasses:
- ActionConfigContentHandler, NavigatorConfigurationContentHandler, PluginContentHandler, RelationMapping
public abstract class SAXTracker
- extends org.xml.sax.helpers.DefaultHandler
INTERNAL: A helper base class for SAX applications that makes it
much easier to write SAX applications, since it helps applications
keep track of the element stack and preserve the contents of
various elements.
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keepContentsOf
protected Set keepContentsOf
locator
protected Locator locator
content
protected StringBuffer content
- The contents of the current element, or null if not
instructed to keep the contents of the current element.
openElements
protected Stack openElements
- The stack of currently open elements.
SAXTracker
public SAXTracker()
keepContentsOf
public void keepContentsOf(String elementName)
- INTERNAL: Instructs the tracker to keep the contents of all
elements with the given name.
isParent
public boolean isParent(String localName)
- INTERNAL: Returns true if the parent element has the given name.
startElement
public void startElement(String nsuri,
String lname,
String qname,
Attributes attrs)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] chars,
int start,
int length)
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(String nsuri,
String lname,
String qname)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interface ContentHandler
- Overrides:
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
Copyright © 2000-2012 Ontopia.