prashant
Answered On : Aug 24th, 2005
the document is not parsed.
Login to rate this answer.
sloth_ll
Answered On : Aug 22nd, 2006
Everything should be fine. DTD is used for validation, parsing doesn't require DTD or schema.
Login to rate this answer.
Mathan
Answered On : Oct 18th, 2006
The Parser will not be able to parse the XML file without the DTD and will throw a file not found exception.
Login to rate this answer.
Sloth_II is correct - although of course it depends on the parser being non-validating or configurable as such.
Login to rate this answer.
DTD is optional
Login to rate this answer.
Mallikarjun
Answered On : Jul 13th, 2007
DTD is must. if the file is not found at location specified you will get following error
java.io.FileNotFoundException: ....AddrBook.dtd (The system cannot find
the file specified)
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.externalParameterEntity(Unknown Sou
rce)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at XMLInfo.main(XMLInfo.java:18)
Login to rate this answer.