public class FlatXmlProducer extends DefaultHandler implements IDataSetProducer, ContentHandler
| Constructor and Description |
|---|
FlatXmlProducer(InputSource xmlSource) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata,
boolean columnSensing) |
FlatXmlProducer(InputSource xmlSource,
boolean dtdMetadata,
boolean columnSensing,
boolean caseSensitiveTableNames) |
FlatXmlProducer(InputSource xmlSource,
EntityResolver resolver) |
FlatXmlProducer(InputSource xmlSource,
IDataSet metaDataSet) |
| Modifier and Type | Method and Description |
|---|---|
void |
endElement(String uri,
String localName,
String qName) |
void |
error(SAXParseException e) |
protected void |
handleMissingColumns(Attributes attributes)
parses the attributes in the current row, and checks whether a new column
is found.
|
boolean |
isCaseSensitiveTableNames() |
void |
produce()
Process this dataset source.
|
InputSource |
resolveEntity(String publicId,
String systemId) |
void |
setColumnSensing(boolean columnSensing) |
void |
setConsumer(IDataSetConsumer consumer) |
void |
setValidating(boolean validating) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharacters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMappingpublic FlatXmlProducer(InputSource xmlSource)
public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata)
public FlatXmlProducer(InputSource xmlSource, IDataSet metaDataSet)
public FlatXmlProducer(InputSource xmlSource, EntityResolver resolver)
public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata, boolean columnSensing)
xmlSource - The input datasourcedtdMetadata - Whether or not DTD metadata is available to parse via a DTD handlercolumnSensing - Whether or not the column sensing feature should be used (see FAQ)public FlatXmlProducer(InputSource xmlSource, boolean dtdMetadata, boolean columnSensing, boolean caseSensitiveTableNames)
xmlSource - The input datasourcedtdMetadata - Whether or not DTD metadata is available to parse via a DTD handlercolumnSensing - Whether or not the column sensing feature should be used (see FAQ)caseSensitiveTableNames - Whether or not this dataset should use case sensitive table namespublic boolean isCaseSensitiveTableNames()
protected void handleMissingColumns(Attributes attributes) throws DataSetException
Depending on the value of the columnSensing flag, the appropriate
action is taken:
attributes - Attributed for the current row.DataSetExceptionpublic void setColumnSensing(boolean columnSensing)
public void setValidating(boolean validating)
public void setConsumer(IDataSetConsumer consumer) throws DataSetException
setConsumer in interface IDataSetProducerDataSetExceptionpublic void produce()
throws DataSetException
IDataSetProducerThis 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 IDataSetProducerDataSetExceptionpublic InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity in interface EntityResolverresolveEntity in class DefaultHandlerSAXExceptionpublic void error(SAXParseException e) throws SAXException
error in interface ErrorHandlererror in class DefaultHandlerSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXExceptionCopyright © 2002-2017. All Rights Reserved.