com.canoo.webtest.reporting
Class XmlReporter

java.lang.Object
  extended by com.canoo.webtest.reporting.XmlReporter
All Implemented Interfaces:
IResultReporter

public class XmlReporter
extends Object
implements IResultReporter

Author:
unknown, Marc Guillemot

Field Summary
static String ROOT_ELEMENT
           
 
Constructor Summary
XmlReporter()
           
 
Method Summary
protected  Document createNewDocument()
          Creates a new document with the basic structure
 void generateReport(RootStepResult result)
           
protected  String getEncoding()
          Gets the encoding used to write the xml report file
protected  File getResultFile(RootStepResult result)
           
protected  Document readXmlFile(File file)
           
protected  void writeXmlFile(Document doc, File outfile)
           
protected  void writeXmlFile(Document doc, Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_ELEMENT

public static final String ROOT_ELEMENT
See Also:
Constant Field Values
Constructor Detail

XmlReporter

public XmlReporter()
Method Detail

readXmlFile

protected Document readXmlFile(File file)
                        throws Exception
Throws:
Exception

writeXmlFile

protected void writeXmlFile(Document doc,
                            File outfile)
                     throws Exception
Throws:
Exception

getEncoding

protected String getEncoding()
Gets the encoding used to write the xml report file

Returns:
"UTF-8"

writeXmlFile

protected void writeXmlFile(Document doc,
                            Writer writer)
                     throws IOException
Throws:
IOException

generateReport

public void generateReport(RootStepResult result)
                    throws Exception
Specified by:
generateReport in interface IResultReporter
Throws:
Exception

getResultFile

protected File getResultFile(RootStepResult result)

createNewDocument

protected Document createNewDocument()
                              throws ParserConfigurationException
Creates a new document with the basic structure

Returns:
the new document
Throws:
ParserConfigurationException - if document factory doesn't work

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.