H
Heinrich Prokop
Hy
I would like to check the validity of my xHTML Document. Here is the code
for it which i use
private static DOMParser parser = new DOMParser();
static {
// turn on validation
try {
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setErrorHandler(new ValidityErrorReporter());
}
catch (SAXNotRecognizedException e) {
System.err.println(
"Installed XML parser cannot validate; checking for well-formedness
instead...");
}
catch (SAXNotSupportedException e) {
System.err.println(
"Cannot turn on validation here; checking for well-formedness
instead...");
}
}
The problem is that I get the following error message "Declaration of
'html' not found." Should I include a xHTML scheme? The example is from the
following homepage
http://www.ibiblio.org/xml/slides/sd2000east/dom/59.html
Should be correct but it doesn't work hope you can help me
Thanks
I would like to check the validity of my xHTML Document. Here is the code
for it which i use
private static DOMParser parser = new DOMParser();
static {
// turn on validation
try {
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setErrorHandler(new ValidityErrorReporter());
}
catch (SAXNotRecognizedException e) {
System.err.println(
"Installed XML parser cannot validate; checking for well-formedness
instead...");
}
catch (SAXNotSupportedException e) {
System.err.println(
"Cannot turn on validation here; checking for well-formedness
instead...");
}
}
The problem is that I get the following error message "Declaration of
'html' not found." Should I include a xHTML scheme? The example is from the
following homepage
http://www.ibiblio.org/xml/slides/sd2000east/dom/59.html
Should be correct but it doesn't work hope you can help me
Thanks