Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

parsing xml string with DTD

843834Jul 12 2001 — edited Jul 12 2001
hi !
I have a xml string as:

String xmlMsg=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<!DOCTYPE elm1 SYSTEM \"myDTD.dtd\">"+

To parse it I do this:
MyHandler myHandler = new MyHandler ();
SAXParser saxParser = factory.newSAXParser();
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
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2001
Added on Jul 12 2001
1 comment