org.mmbase.util
Class XMLChecker

java.lang.Object
  extended byorg.mmbase.util.XMLChecker

public class XMLChecker
extends java.lang.Object

Check XML documents against their DTD's and be as pretty as possible about errors

Author:
Cees Roele

Nested Class Summary
 class XMLChecker.XMLCheckerHandler
          Handler for processing errors and warnings during parsing of a xml document.
 
Field Summary
static java.lang.String error_color
          Color for error messages
static java.lang.String fatalerror_color
          Color for fatal error messages
static java.lang.String warning_color
          Color for warning messages
 
Constructor Summary
XMLChecker(java.io.PrintStream out)
          Create a checker
 
Method Summary
 boolean validate(java.lang.String filename)
          Validate a specified xml file.
 void validateAndReport(java.lang.String filename)
          Validate a specified xml file, and create a report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

error_color

public static java.lang.String error_color
Color for error messages


fatalerror_color

public static java.lang.String fatalerror_color
Color for fatal error messages


warning_color

public static java.lang.String warning_color
Color for warning messages

Constructor Detail

XMLChecker

public XMLChecker(java.io.PrintStream out)
Create a checker

Parameters:
out - Stream that recieves the results of the check (errors and warnings and report).
Method Detail

validateAndReport

public void validateAndReport(java.lang.String filename)
Validate a specified xml file, and create a report. Results of the parsing attempt (errors and warnings) are sent to the out stream.

Parameters:
filename - path to the xml file to parse and check

validate

public boolean validate(java.lang.String filename)
Validate a specified xml file. Does not curerntly do anything.

Parameters:
filename - path to the xml file to parse and check
Returns:
always true


MMBase build 1.7.1.20041002