Package org.dbunit.dataset.xml

Examples of org.dbunit.dataset.xml.FlatXmlWriter


        this.doClose = doClose;
    }
   
    public IDataSetConsumer getConsumer() throws Exception {
        if (consumer == null) {
            consumer = new FlatXmlWriter(stream);
        }
       
        return consumer;
    }
View Full Code Here


   * Write the specified dataset to the specified output stream as xml.
   */
  public static void write(IDataSet dataSet, OutputStream out) throws IOException, DataSetException {
    logger.debug("write(dataSet={}, out={}) - start", dataSet, out);

    FlatXmlWriter datasetWriter = new FlatXmlWriter(out);
    datasetWriter.setIncludeEmptyTable(true);
    datasetWriter.write(dataSet);
  }
View Full Code Here

  public static void write(IDataSet dataSet, Writer writer, String encoding) throws DataSetException {
    if (logger.isDebugEnabled()) {
      logger.debug("write(dataSet={}, writer={}, encoding={}) - start", new Object[] { dataSet, writer, encoding });
    }

    FlatXmlWriter datasetWriter = new FlatXmlWriter(writer, encoding);
    datasetWriter.setIncludeEmptyTable(true);
    datasetWriter.write(dataSet);
  }
View Full Code Here

                OutputStream out = new FileOutputStream(_dest);
                try
                {
                    if (_format.equalsIgnoreCase(FORMAT_FLAT))
                    {
                        FlatXmlWriter writer = new FlatXmlWriter(out, getEncoding());
                        writer.setDocType(_doctype);
                        writer.write(dataset);
                    }
                    else if (_format.equalsIgnoreCase(FORMAT_XML))
                    {
                        XmlDataSet.write(dataset, out, getEncoding());
                    }
View Full Code Here

                OutputStream out = new FileOutputStream(_dest);
                try
                {
                    if (_format.equalsIgnoreCase(FORMAT_FLAT))
                    {
                        FlatXmlWriter writer = new FlatXmlWriter(out);
                        writer.setDocType(_doctype);
                        writer.write(dataset);
                    }
                    else if (_format.equalsIgnoreCase(FORMAT_XML))
                    {
                        XmlDataSet.write(dataset, out);
                    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.xml.FlatXmlWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.