protected static class MultiSchemaXmlDataSetReader.DataSetContentHandler extends DefaultHandler
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,DbUnitDataSet> |
dbUnitDataSetsPerSchemaName |
protected String |
defaultSchemaName |
| Constructor and Description |
|---|
MultiSchemaXmlDataSetReader.DataSetContentHandler(String defaultSchemaName)
Creates a data set SAX content handler
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRow(Attributes attributes,
DbUnitTable table)
Gets column names and row values from the given attribute and adds a new row to the given table.
|
void |
error(SAXParseException e)
Overridden to rethrow exception.
|
MultiSchemaDataSet |
getMultiSchemaDataSet()
Gets the result data set.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Processes an xml element.
|
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningprotected String defaultSchemaName
protected Map<String,DbUnitDataSet> dbUnitDataSetsPerSchemaName
public MultiSchemaXmlDataSetReader.DataSetContentHandler(String defaultSchemaName)
defaultSchemaName - The schema name to use when none is specified, not nullpublic MultiSchemaDataSet getMultiSchemaDataSet()
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandleruri - the xml namespace uri (= schema name)localName - the local xml nameqName - the element name (should be table name for table rows)attributes - the attributes (should be table columns for table rows)SAXExceptionprotected void addRow(Attributes attributes, DbUnitTable table)
table - The table to add the row to, not nullattributes - the attributes, not nullpublic void error(SAXParseException e) throws SAXException
error in interface ErrorHandlererror in class DefaultHandlere - The exceptionSAXExceptionCopyright © 2016. All Rights Reserved.