Re: parsing "&A" in a string..

2008-08-31 Thread Tino Wildenhain
Tim Roberts wrote: "bruce" <[EMAIL PROTECTED]> wrote: it's the beautifulsoup() that's taking the "&E" and giving the "&E;"... Right, as it should. "A&E" is not valid HTML, and beautifulsoup expects valid HTML. This can be difficult to fix in the general case, because your page might already

Re: parsing "&A" in a string..

2008-08-31 Thread Tim Roberts
"bruce" <[EMAIL PROTECTED]> wrote: > >it's the beautifulsoup() that's taking the "&E" and giving the "&E;"... Right, as it should. "A&E" is not valid HTML, and beautifulsoup expects valid HTML. This can be difficult to fix in the general case, because your page might already contain "&". If it

RE: parsing "&A" in a string..

2008-08-31 Thread bruce
aha... it's the beautifulsoup() that's taking the "&E" and giving the "&E;"... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Fredrik Lundh Sent: Sunday, August 31, 2008 1:10 PM To: python-list@python.org Subject:

RE: parsing "&A" in a string..

2008-08-31 Thread bruce
riginal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Fredrik Lundh Sent: Sunday, August 31, 2008 1:10 PM To: python-list@python.org Subject: Re: parsing "&A" in a string.. bruce wrote: > a pretty simple question, i'm guessing. > > i have a text/h

Re: parsing "&A" in a string..

2008-08-31 Thread Fredrik Lundh
bruce wrote: a pretty simple question, i'm guessing. i have a text/html string that looks like: (A&E) the issue i have is that when i parse it using xpath/node/toString, i get the following ...(A&E;). that's because your parser is interpreting the &E part as an entity reference