public class XmlProducer extends org.xml.sax.helpers.DefaultHandler implements IDataSetProducer, ContentHandler, ErrorHandler
Constructor and Description |
---|
XmlProducer(InputSource inputSource) |
Modifier and Type | Method and Description |
---|---|
protected static DataSetException |
buildException(SAXException cause)
Wraps a
SAXException into a DataSetException |
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String localName,
String qName) |
void |
error(SAXParseException e) |
void |
produce()
Process this dataset source.
|
InputSource |
resolveEntity(String publicId,
String systemId) |
void |
setConsumer(IDataSetConsumer consumer) |
void |
setValidating(boolean validating) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
fatalError, warning
public XmlProducer(InputSource inputSource)
public void setValidating(boolean validating)
public void setConsumer(IDataSetConsumer consumer) throws DataSetException
setConsumer
in interface IDataSetProducer
DataSetException
public void produce() throws DataSetException
IDataSetProducer
This method is synchronous: it will not return until processing has ended. If a client application wants to terminate parsing early, it should throw an exception from the listener.
produce
in interface IDataSetProducer
DataSetException
protected static final DataSetException buildException(SAXException cause)
SAXException
into a DataSetException
cause
- The cause to be wrapped into a DataSetException
DataSetException
that wraps the given SAXException
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void error(SAXParseException e) throws SAXException
error
in interface ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
SAXException
Copyright © 2002–2016. All rights reserved.