This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes DOM deferred node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DOM deferred node" Watch "DOM deferred node" New topic

DOM deferred node

Venkata Pavan Kumar vemuri

Joined: Feb 01, 2010
Posts: 14

hi all,

I am trying to implement the deferred node concept of DOM parser

I have created an instance of Documentbuilderfactory and used it to set the deferred node property and classname as follows

dbf.setFeature("", true );
dbf.setAttribute("", "org.apache.xerces.dom.DocumentImpl" );

But I am getting the following error

Exception in thread "main" java.lang.IllegalArgumentException: MissingDocumentClassName: The class name of the document factory "org.apache.xerces.dom.DocumentImpl" used to construct the DOM tree could not be found.
at Source)
at Source)
at Source)
at Source)
at Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at DOMParserNV.DOMParser(
at DOMParserNV.main(

Can somebody please tell me wht is wrong with my implementation

Thanks in advance
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13000
Which version of the Xerces-J library are you using?

Unfortunately, the JavaDocs I could find for org.apache.xerces.dom.DocumentImpl did not state when it was introduced.

Venkata Pavan Kumar vemuri

Joined: Feb 01, 2010
Posts: 14
I am not using any xerces j library....
Paul Clapham

Joined: Oct 14, 2005
Posts: 19723

Then I suppose you will have to download one and put it in your classpath. Probably the latest version would work, but if wherever you heard about those properties mentions anything about some versions working and some not working, then pay attention to whatever it said.
I agree. Here's the link:
subject: DOM deferred node
It's not a secret anymore!