Your data is still not well-formed XML. The only pre-defined entities in XML are <, &, >, " and '. Numerical entities, &#nb; or &#xnb; are also allowed. Everything else needs to be declared.
So you have several options here:
this has the advantage that your documents are standalone (they don't depend on external files) but an empty document might be quite big,<!DOCTYPE rec [ <!ENTITY le "≤ > <!-- many more entity declarations--> ]> <rec> ≤</rec>
you can get the entity declaration files from the W3C.<!DOCTYPE rec [ <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "xhtml-lat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent"> %HTMLspecial; ]> <rec> ≤</rec>
You could also internally use the entity declaration files and pre-process the XML to convert them to numerical entities. I can't think of an easy way to do this right now (except using xmlwf -p -d result_dir file.xml but then the output is in utf-8) but I'll have a look at it.
Update: fixed typo in doctype
In reply to Re: XML::Parser and &entity;
by mirod
in thread XML::Parser and &entity;
by dingus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |