[jdom-interest] SAXBUILDER

Laurent Bihanic laurent.bihanic at atosorigin.com
Tue Aug 19 01:16:34 PDT 2003

salil khanwalkar wrote:
> This is the error i get after turning on the validations of saxbuilder().
> Error on line 2 of document http://localhost/webpub/dataset.xml: 
> Document is invalid: no grammar found.

Unlike schemas, use of DTDs for validation requires the DTD to be declared or 
referenced in the document, using <!DOCTYPE ...>.

Try with:
<?xml version="1.0" ?>

<!DOCTYPE dataSet [
   <!ELEMENT dataSet (user)*>
   <!ELEMENT user EMPTY>
   <!ATTLIST user
     password CDATA #IMPLIED
     username CDATA #IMPLIED>

  <user username="k_salil" password="xxxxxx" />
  <user username="user123" password="xxxxxx1" />
  <user username="1234" password="xxxxxx12" />
  <user username="user12345" password="xxxxxx123" />
  <user username="user123456" password="xxxxxx1234" />


More information about the jdom-interest mailing list