[jdom-interest] JDOM B6 Errors

philip.nelson at omniresources.com philip.nelson at omniresources.com
Tue May 29 09:54:36 PDT 2001


> I have a document, in the following format 
> 
> <?xml version="1.0" standalone="yes"?>
> 
> <REQUEST>
>   <TIMESTAMP>2000/10/06 08:14:49</TIMESTAMP>
>   <USER>User's name here</USER>
>   <FACILITY>Testset1234</FACILITY> 
>   <ACTION >Echo</ACTION>
>   <DATABLOCK>
>     <PARTID>
>       <DUMMY_DATA>LP12345</DUMMY_DATA>
>     </PARTID>
>   </DATABLOCK>
> </REQUEST>
> 
> 
> SAXBuilder builder = new SAXBuilder(debug);
>      try {
>        d = builder.build(bais);
> 
> I get an eception at builder.build...
> 
> I was using jdom b5 and everything was working fine, but 
> since I upgraded to
> b6 I started getting this exception
> 
> org.jdom.JDOMException: Element type "REQUEST" must be 
> declared.: Error on
> line 4: Element type "REQUEST" must be declared.
> 
> Anone have any idea why I am getting this exception?  

You must have validation set to true and you don't have a dtd that declares
the document.  Set validation to false or build a dtd and the problem should
go away.



More information about the jdom-interest mailing list