org.mmbase.util
Class XMLChecker
java.lang.Object
|
+--org.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
|
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 |
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
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).
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 2001