com.sun.faban.harness.logging
Class XMLFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.XMLFormatter
          extended by com.sun.faban.harness.logging.XMLFormatter

public class XMLFormatter
extends XMLFormatter

Overrides the XML header provided by the XMLFormatter in the JavaSE logging package. The original/superclass puts an absolute reference to a DTD into the XML header. This DTD never exists in the wanted places causing the parser to bail out. On some versions of the XML parser we can set the feature http://apache.org/xml/features/nonvalidating/load-external-dtd to false and therefore ignore the DTD header altogether, but this causes problems in parsers where the feature is not supported and the DTD is always loaded.

Author:
Akara Sucharitakul

Constructor Summary
XMLFormatter()
           
 
Method Summary
 String getHead(Handler h)
          Return the header string for a set of XML formatted records.
 
Methods inherited from class java.util.logging.XMLFormatter
format, getTail
 
Methods inherited from class java.util.logging.Formatter
formatMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFormatter

public XMLFormatter()
Method Detail

getHead

public String getHead(Handler h)
Return the header string for a set of XML formatted records.

Overrides:
getHead in class XMLFormatter
Parameters:
h - The target handler (can be null)
Returns:
a valid XML string