JDOM DOMBuilder constructor error with boolean argument!!
Hi,
I am very new to JDOM and am trying to compile this little piece of code:
import org.jdom.*;
import org.jdom.input.DOMBuilder;
import org.apache.xerces.parsers.*;
public class DOMValidator {
public static void main(String[] args) {
if (args.length == 0) {
System.out.println("Usage: java DOMValidator URL1 URL2...");
}
boolean a = true;
DOMBuilder builder = new DOMBuilder(true);
/* ^^^^*/
/* Turn on validation */
// start parsing...
DOMParser parser = new DOMParser(); // Xerces specific class
for (int i = 0; i < args.length; i++) {
try {
// Read the entire document into memory
parser.parse(args);
org.w3c.dom.Document domDoc = parser.getDocument();
org.jdom.DocumentjdomDoc = builder.build(domDoc);
// If there are no validity errors,
// then no exception is thrown
System.out.println(args + " is valid.");
}
catch (Exception e) { // indicates a well-formedness or validity error
System.out.println(args + " is not valid.");
System.out.println(e.getMessage());
}
}
}
}
DOMValidator.java:14: cannot find symbol
symbol : constructor DOMBuilder(boolean)
location: class org.jdom.input.DOMBuilder
DOMBuilder builder = new DOMBuilder(true);
^
I constantly keep getting this error.
Would really appreciate if someone could tell me where to look at.
Withough the true or false the code compiles successfully. I am sort of lost for ideas now.
Thanks in advance for any help provided with this.
Manish

