Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19265

Re: lxml to parse html

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!amsnews11.chello.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <awilliam@whitemice.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'xml,': 0.05; 'content- type:multipart/signed': 0.09; 'filename:fname piece:signature': 0.09; 'developer': 0.12; 'mon,': 0.15; 'adam': 0.16; 'content- type:application/pgp-signature': 0.16; 'filename:fname piece:asc': 0.16; 'filename:fname:signature.asc': 0.16; 'from:addr:awilliam': 0.16; 'from:addr:whitemice.org': 0.16; 'from:name:adam tauno williams': 0.16; 'received:72.14.190': 0.16; 'received:72.14.190.87': 0.16; 'received:mail.wmmi.net': 0.16; 'received:wmmi.net': 0.16; 'reply-to:addr:awilliam': 0.16; 'reply- to:addr:whitemice.org': 0.16; 'subject:lxml': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.22; 'import': 0.27; 'received:72.14': 0.29; 'html.': 0.30; 'to:addr:python-list': 0.33; 'received:192': 0.38; 'received:192.168.1': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'url:us': 0.60; 'your': 0.61; 'williams': 0.63; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72
Subject Re: lxml to parse html
From Adam Tauno Williams <awilliam@whitemice.org>
To python-list@python.org
Date Mon, 23 Jan 2012 10:30:40 -0500
In-Reply-To <CA+YdQ_6Gmk10bJjFFuiax-se5sXZXK4wYC_LY34TWOseOMSpHA@mail.gmail.com>
References <CA+YdQ_6Gmk10bJjFFuiax-se5sXZXK4wYC_LY34TWOseOMSpHA@mail.gmail.com>
Content-Type multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-GuE5ZQmrKXpxOZeDWWMY"
X-Mailer Evolution 3.2.1
Mime-Version 1.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To awilliam@whitemice.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4965.1327332741.27778.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1327332741 news.xs4all.nl 6857 [2001:888:2000:d::a6]:45942
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19265

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, 2012-01-23 at 15:39 +0800, contro opinion wrote:
> import lxml.html
> myxml='''
> <cooperate>
> <job DecreaseHour="1" table="tpa_radio_sum">
> </job>

Use lxml.etree not lxml.html.  Your content is XML, not HTML.

-- 
System & Network Administrator [ LPI & NCLA ]
<http://www.whitemiceconsulting.com>
OpenGroupware Developer <http://www.opengroupware.us>
Adam Tauno Williams

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: lxml to parse html Adam Tauno Williams <awilliam@whitemice.org> - 2012-01-23 10:30 -0500

csiph-web