xml.dom.minidom entity reference translation

Martin von Loewis loewis at informatik.hu-berlin.de
Sat Oct 27 10:49:54 EDT 2001


Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> writes:

> The XML parser in this module appears to be a bit heavy on spaces
> around the entity references: < & > etc.
> 
> It is removing all of them leaving the translated characters next to
> the first non-blank on either side.

I've never heard of such a behaviour, and cannot reproduce it. Can you
show some example that demonstrates the behaviour?

> <monty> abc  def  >   xyz </monty>
> 
> gives:
> 
> abc  def>xyz

On it's own, the XML parser doens't display any text. It can't be
to_xml, either, since that would have produced <monty>...</monty>. 
So how did you get that output?

Regards,
Martin



More information about the Python-list mailing list