parsing xml string with DTD
843834Jul 12 2001 — edited Jul 12 2001hi !
I have a xml string as:
String xmlMsg=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<!DOCTYPE elm1 SYSTEM \"myDTD.dtd\">"+
"<elm1>"+
"<elm2>"+
"</elm2>";
"</elm1>";
To parse it I do this:
MyHandler myHandler = new MyHandler ();
SAXParser saxParser = factory.newSAXParser();
factory.setValidating(true);
StringBufferInputStream sbis= new StringBufferInputStream(xmlMsg);
saxParser.parse( new InputSource(new StringReade (xmlMsg)), myHandler);
but I get this error which I think means that it can not find the DTD file.
org.xml.sax.SAXParseException: org.apache.crimson.parser/P-055 myDTD.dtd
appreciate any help