IntelliJ open source
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » XML and Related Technologies
 
RSS feed
 
New topic
Author

DOM deferred node

Venkata Pavan Kumar vemuri
Greenhorn

Joined: Feb 01, 2010
Messages: 13



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("http://apache.org/xml/features/dom/defer-node-expansion", true );
dbf.setAttribute("http://apache.org/xml/properties/dom/document-class-name", "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 com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.setDocumentClassName(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.reset(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at DOMParserNV.DOMParser(DOMParserNV.java:35)
at DOMParserNV.main(DOMParserNV.java:69)


Can somebody please tell me wht is wrong with my implementation

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

Joined: Mar 22, 2000
Messages: 10253

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.

Bill

Java Resources at www.wbrogden.com
Venkata Pavan Kumar vemuri
Greenhorn

Joined: Feb 01, 2010
Messages: 13

I am not using any xerces j library....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Messages: 7170

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.
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » XML and Related Technologies
 
RSS feed
 
New topic
The most intelligent Java IDE