Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

parsing problem in JBoss

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't crosspost. It makes discussions harder to follow and is unlikely to get you a quicker response.

Since this isn't a JBoss question, please continue any discussions in the XML and Related Technologies forum.
[ December 13, 2005: Message edited by: Paul Sturrock ]
 
    Bookmark Topic Watch Topic
  • New Topic