Unless you care about getting external entities to work. If you do,
you'll need to check for entity declarations.
I've written a simple Perl script that loops through a file and
handles external entities. A better thing to do would be to use Larry
Wall's XML::Parser package, which is a wrapper on James Clark's
xmltok, but I'm having shared library problems...
I'm willing to share the Perl script with anyone who wants it; you can
see its current frivolous application as a Diplomacy board game report
generator at <URL:http://crism.ne.mediaone.net/cgi-bin/diplo.pl>.
-Chris
-- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>