[jdom-interest] org.jdom.JDOMException
Stefanos Kaklamanis
stefka at gnt.gr
Tue Nov 12 03:44:58 PST 2002
Hi,
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"?>
<books>
<book isbn="123">
<title>Web Servers for Fun and Profit</title>
<quantity>10</quantity>
<price>$17.95</price>
</book>
<book isbn="456">
<title>Web Programming for Mobile Devices</title>
<quantity>2</quantity>
<price>$38.95</price>
</book>
</books>
Any idea?
Thanks
Stef
-------------- 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