well-formed xml
Martin Bertolino
martinbertolino at yahoo.com
Fri Sep 27 09:17:44 EDT 2002
I believe you document should be encoded as:
<a href='http://google.com/search?hl=en&q=foobar'>search</a>
Martin
"Mark McEahern" <mark at mceahern.com> wrote in message news:<mailman.1033085436.9260.python-list at python.org>...
> I'm obviously missing something because this seemingly innocent chunk of
> xhtml:
>
> from xml.dom import minidom
>
> s = "<a href='http://google.com/search?hl=en&q=foobar'>search</a>"
> # ^
> # - seems to be the problem
> #
> # maybe it thinks I'm trying to reference the &q entity?
>
> doc = minidom.parseString(s)
>
> Exception traceback follows.
>
> Is there a way for me to tell it to ignore apparent entity references inside
> attribute values?
>
More information about the Python-list
mailing list