[jdom-interest] java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

Simon.Hall at transwareplc.com Simon.Hall at transwareplc.com
Tue May 28 08:41:45 PDT 2002


Correction, this line

      Document doc = builder.build(xmlString);

Should read:

      Document doc = builder.build(new StringReader(xmlString));

Sory :-)

>     SAXBuilder builder = new SAXBuilder
("org.apache.xerces.parsers.SAXParser");
>     //specify that xerces is a validating parser
>     builder.setValidation(true);
>     //assign an error handler to xerces to display well-formedness errors
>     builder.setErrorHandler(new SAXErrorHandler());
>     builder.setFeature
>           ("http://apache.org/xml/features/validation/schema", true);
>     //specify that the XML file being parsed is validated against
>     //SCORM metadata schema
>     builder.setProperty
>           ("
http://apache.org/xml/properties/schema/external-schemaLocation",
>                 ErudigmConstants.IMSMD_ROOT_V1_P2_P1_NS + " " +
TOMCAT_ROOT
>                 + ErudigmConstants.SCORM_SCHEMA_PATH
>                 + ErudigmConstants.IMSMD_ROOT_V1_P2_P1_XSD);
>     Document doc = builder.build(xmlString);
>






More information about the jdom-interest mailing list