Customizing External Entity Resolution
So far, you have seen how the SAX parser resolves entities defined within the scope of the document. However, XML specifications provide the capability to refer and use entities that are defined outside the document. For example, an XML document can refer to an external DTD or an external parameter entity. A parameter entity enables an application to reuse parts of a DTD in multiple places in an XML document. This is analogous to general entities, which enable the text to be reused in multiple places in an XML document.
Normally, the SAX parser automatically processes the external entities. However, the SAX package provides an interface called EntityResolver, with which an application can implement its own ...
Get Java™ APIs for XML Kick Start now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.