FileDocCategorySizeDatePackage
ResultsDecoratorXML.javaAPI DocExample1126Thu Mar 25 20:39:34 GMT 2004None

ResultsDecoratorXML

public class ResultsDecoratorXML extends ResultsDecorator
This guy's primary raison d'etre is to generate an XML output file for use in JUnit testing of the ResultsDecoratorSQL!
version
$Id: ResultsDecoratorXML.java,v 1.1 2004/03/26 02:39:33 ian Exp $

Fields Summary
WebRowSet
results
Constructors Summary
ResultsDecoratorXML(ResultsDecoratorPrinter out)

		super(out);
		try {
			// The name is com.sun.rowset.WebRowSetImpl in rowset.jar,
			// but sun.rowset.jar in J2SDK1.5. Go figure.
			Class c = Class.forName("com.sun.rowset.WebRowSetImpl");
			results = (WebRowSet)c.newInstance();
			
		} catch (Exception ex){
			throw new IllegalArgumentException(
			"can't load WebRowSetImpl, check CLASSPATH");
		}
	
Methods Summary
java.lang.StringgetName()

		return "XML";
	
public voidwrite(java.sql.ResultSet rs)

		results.writeXml(rs, parent.getPrintWriter());
	
voidwrite(int rowCount)

		println("RowCount: " + rowCount);