allow charcodes like &#0A;, &amp;, etc

It makes this rosettacode example pass: http://rosettacode.org/wiki/XML/Input#Perl
Perhaps this makes a good test case.