[jdom-interest] org.jdom.JDOMException
Malachi de AElfweald
malachi at tremerechantry.com
Wed Nov 13 09:19:46 PST 2002
Since you are telling it to validate against a DTD:
DOMBuilder builder = new DOMBuilder(true);
what does your DTD look like?
Malachi
11/12/2002 3:44:58 AM, "Stefanos Kaklamanis" <stefka at gnt.gr> wrote:
>
>
> From: "Stefanos Kaklamanis" <stefka at gnt.gr>
>
> To: <jdom-interest at jdom.org>
> Subject:[jdom-interest] org.jdom.JDOMException
> Date: Tue, 12 Nov 2002 13:44:58 +0200
>
>
>
> 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
More information about the jdom-interest
mailing list