Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'nicely': 0.07; 'ugly': 0.07; 'way:': 0.09; 'elements,': 0.16; 'notably': 0.16; 'wrote:': 0.18; 'stefan': 0.19; 'thu,': 0.19; 'seems': 0.21; 'creating': 0.23; 'looks': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'though.': 0.31; 'subject:with': 0.35; 'received:google.com': 0.35; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; '20,': 0.68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=3jMENeNsDqxbdsHtHP9OOIln6LC0OiwbVf96cA9EZUQ=; b=bRxU4hVNSLR4tVOoRrNn7joP6EuY22Pgm3TSHuUNDc72ecbaso6KdBWMq+eHO0vRQr 05qihD76ZnrdA8UYlRaOV30k4wBFHA2062uVgXnYgqTzJNfD67JEp3NgpgRQPQtaCrGO 8031GyUENAj9ZRUQRtpnhOHn3lwoUOeYTDUY8KgsqfkWFGgGvuZlipFDaFrHrzi91dSw mmDybuEjcPqhBki0FkTBaedg49l66xuIcBZFzppsVzLMMsyFUPsEUDMcxRCaoHvcHSAE XT7dBUoJXG7vO7iO0xPrWVj7hcplNDb73zPW9Snza4H522xEDrFCgagaZmIKs3lVaWOI 6PGQ== X-Received: by 10.70.47.195 with SMTP id f3mr30224pdn.156.1416512712050; Thu, 20 Nov 2014 11:45:12 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <69c8db11-5928-4978-a0ca-0cd042f0febb@googlegroups.com> From: Ian Kelly Date: Thu, 20 Nov 2014 12:44:31 -0700 Subject: Re: Working with HTML5 documents To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416512721 news.xs4all.nl 2931 [2001:888:2000:d::a6]:46600 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81118 On Thu, Nov 20, 2014 at 12:02 PM, Stefan Behnel wrote: > There's also the E-factory for creating (sub-)trees and a nicely objectish way: > > http://lxml.de/lxmlhtml.html#creating-html-with-the-e-factory That looks ugly with all those caps and also hard to extend. Notably it seems to be missing any functions to build HTML5 elements, unless those have been added in lxml 3.4. Working with lxml.html.Element directly seems pretty versatile, though.