Yes: if you want an XML parser to process your file, then
the file must be well-formed XML. That means that if it contains any entity
references, there must be a declaration of those entities (so there must
be a DTD).
You can probably preprocess your file to turn it into
well-formed XML by adding the DTD before parsing.
Michael Kay
So, in order for SAXBuilder to correctly parse/build a XML file,
the XML file must contain DOCTYPE declaration?
On 8/31/05, Michael
Kay <mike@saxonica.com>
wrote:
I am having some trouble figuring out how to go
about resolving entities when an XML file doesn't have DOCTYPE declaration
(no DTD attached to it), but contains entities that are 'non-standarad'
(such as, ' ', etc...).
I don't
think such a file can correctly be described as an XML
file.
Michael
Kay