when i parse a file and display the document itself , ithis is the prob i got
when i use this :
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(fileName_);
System.out.println(factory+"
TESTING DOC::::" + document);
i get this output : TESTING DOC:::: #document :: null
when i explicitly specify the parser like this it works:
Class obj = Class.forName(
"org.apache.crimson.jaxp.DocumentBuilderFactoryImpl" );
DocumentBuilderFactory factory = (DocumentBuilderFactory)
obj.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
System.out.println("Parsing File:" +fileName_);
document = builder.parse(fileName_);
System.out.println(obj+" || " +factory+" TESTING DOC::::" + document);
any way i can correct it so the first one works? or i have to change a
lot in my app..
this wud be of grt help..