Unparsed entities really aren't handled at all.
Most of the time, the parser resolves general entity references and you never see them.
If the parser doesn't resolve a general entity reference,
an EntityRef
object will be left in the tree.
When writing, the outputter outputs entity references but not the entity's content.
This one is still being thought out.