XML and DTD pasring

david at megginson.com david at megginson.com
Mon Oct 19 17:37:05 BST 1998

Sung Nguyen writes:

 > With IBM Alpha Parser,  It is working fine with
 > both DTD and XML in the same files.  But, when I have
 > DTD in a separated file stored in a buffer - also the
 > XML file is stored in a buffer too. The parser doen't
 > provide the API to do that job.

I haven't tested the SAX support in XML4J recently, but if it supports
EntityResolvers correctly, you can simply make up a URI for the
external DTD, and then supply your own Reader for the buffer when you
see the URI.

For more information, see


It is possible to use entity resolvers in quite clever ways -- you can 
also pull information out of a database, request user input in a
dialog box, etc.  I wish that I could take credit for the idea, but I
think that the original suggestion came from James Clark.

All the best,


David Megginson                 david at megginson.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list