[jdom-interest] org.jdom.JDOMException

Stefanos Kaklamanis stefka at gnt.gr
Tue Nov 12 03:44:58 PST 2002


I'm POSTing an xml-jdom document (through an application) to a servlet, that it reads the stream (using the request.getReader). Then, it creates another xml doc kai POST it back (using XMLOutputter).

The problem i have is when the application is trying to build the xml document from the response stream. 
DOMBuilder builder = new DOMBuilder(true);
outDoc = builder.build(conn.getInputStream());        <---------

I take the following error:

org.jdom.JDOMException: Error on line 2 of XML document: Element type "books" must be declared.

the repsonse xml is the following:
<?xml version="1.0" encoding="UTF-8"?>
 <book isbn="123">
  <title>Web Servers for Fun and Profit</title>
 <book isbn="456">
  <title>Web Programming for Mobile Devices</title>

Any idea?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20021112/7ca33fc1/attachment.htm

More information about the jdom-interest mailing list