de.tudarmstadt.ukp.jwktl.parser
Class XMLDumpParser.XMLDumpHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
de.tudarmstadt.ukp.jwktl.parser.XMLDumpParser.XMLDumpHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Enclosing class:
- XMLDumpParser
protected class XMLDumpParser.XMLDumpHandler
- extends DefaultHandler
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contentBuffer
protected StringBuffer contentBuffer
tags
protected Stack<String> tags
XMLDumpParser.XMLDumpHandler
protected XMLDumpParser.XMLDumpHandler()
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DefaultHandler
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class DefaultHandler
- Throws:
SAXException
getContents
public String getContents()
- Returns the contents of the currently active XML element.
hasContents
public boolean hasContents()
- Returns whether there is a non-empty content within the currently
active XML element.
getParent
public String getParent()
- Returns the XML tag name of the parent of the currently active
XML element.
Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.