This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Exception raised when trying to create a document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Exception raised when trying to create a document" Watch "Exception raised when trying to create a document" New topic
Author

Exception raised when trying to create a document

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
I am tring to convert a response into a xml document. Using httpunits object and method WebResponse.getDom()

The code is as follows:

private void printDocumentModel(WebResponse webresponse) throws Exception
{
Document doc = webresponse.getDOM();

}

and it thows the following exception:
The implementation does not support the requested type of object or operation.

Thanks for any help

Tony
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Sorted the problem httpunit returns a document of type

import org.w3c.dom.Document;

My jom.jar contains document

org.jdom.Document

Just cast the firts into the latter.
Tony
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Actually ignore second reply from me total rubbish
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Exception raised when trying to create a document
 
Similar Threads
WebResponse cant be created
Anyone understand what this exception means
Null Pointer Exception
Getting a exception with httpunit WebResponse.getDOM()
current-element-node property not recognized