Entities and notations

XML documents may include entities (some of them perhaps including references to notations) and references to these entities embedded in the text. The DOM therefore includes interfaces for handling notations, entities and references to entities.

Entity references

When parsable entity references appear in an XML document, the parser will either replace the references with the content of the entity before building the DOM tree, or will leave the entity references in place. In the former case, the application reading from the DOM simply never knows that they existed. But when the references are left in the text, they are represented by EntityReference nodes (rather than ignored and left as embedded character sequences in the ...

Get XML Companion, The, Third Edition 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.