Re: losing entities when parsing then texting

Mike Brown <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
Greg Wilson wrote:
> Dieter Maurer wrote:
> > "Minidom"s support for entities is weak.
> > 
> > Try to avoid them (beside the standard XML entities) by
> > using the corresponding Unicode characters instead.
> 
> I realize I should include the Unicode characters directly in my files,
> but that's not possible in this case---I have to accommodate people who
> are using editors that only handle 7-bit ASCII.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE z [
  <!ENTITY bullet "&#2022;">
  <!ENTITY eacute "&#233;">
]>
<z>&bullet; &eacute;</z>

means exactly the same as

<?xml version="1.0" encoding="utf-8"?>
<z>&#2022; &#233;</z>

so why not just use the latter? No need for entities when you can
use numeric character references. Accommodating 7-bit editors is
basically what they exist for.

Mike
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
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.