Handlers for entities?

Aaron Hillegass <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
I'm using expat in an XML editor I'm writing.  So far, it has been  
perfect.  Now I need to have a handler called for entities.   For  
example, if I have a document like this:

<?xml version="1.0"?>
<chapter>
   <title>Advanced Topics</title>
   <para>If you want to go skiing &mdash; I suspect you do &mdash;  
get on the bus.</para>
</chapter>

At the moment, expat chokes on the &mdash; and fails to parse  
("undefined entity").  I'd really want it to call one of my functions  
so that I can deal with the entity in my code.  Is this possible?

Thanks in advance,
Aaron Hillegass
Big Nerd Ranch, Inc.
http://www.bignerdranch.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.