про обработку в expat
http://books.google.com/books?id=bPfQnxnw_NMC&pg=PA51&lpg=PA51&dq=xml.parsers.expat+entities&source=web&ots=C2pzkEMI5b&sig=Nrv9OEc7YR2LHlG4-Ac2qPUA60E&hl=en&sa=X&oi=book_result&resnum=10&ct=result