<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#8eaab0>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem i have is when the application is
trying to build the xml document from the response stream. </FONT></DIV>
<DIV><FONT face=Arial size=2><EM>DOMBuilder builder = new
DOMBuilder(true);</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM>outDoc =
builder.build(conn.getInputStream());
<---------</EM></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I take the following error:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><EM>org.jdom.JDOMException: Error on line 2 of XML
document: Element type "books" must be declared.</EM></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the repsonse xml is the following:</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2>
<P><?xml version="1.0"
encoding="UTF-8"?><BR><books><BR> <book
isbn="123"><BR> <title>Web Servers for Fun and
Profit</title><BR> <quantity>10</quantity><BR> <price>$17.95</price><BR> </book><BR> <book
isbn="456"><BR> <title>Web Programming for Mobile
Devices</title><BR> <quantity>2</quantity><BR> <price>$38.95</price><BR> </book><BR></books><BR></P>
<P>Any idea?</P>
<P> </P>
<P>Thanks</P>
<P>Stef</P></FONT></DIV></BODY></HTML>