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


Groups > comp.lang.python > #37543

Re: XML/XHTML/HTML differences, bugs... and howto

Date 2013-01-23 23:32 +0000
From Andrew Robinson <andrew3@r3dsolutions.com>
Subject Re: XML/XHTML/HTML differences, bugs... and howto
References <5100002F.7020809@r3dsolutions.com> <kdql4b$nme$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.946.1359012888.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 01/24/2013 06:42 AM, Stefan Behnel wrote:
> Andrew Robinson, 23.01.2013 16:22:
>> Good day :),
> Nope, you should read the manual on this. Here's a tutorial:
>
> http://lxml.de/tutorial.html#elements-contain-text
I see, so it should be under the "tail" attribute, not the "text" 
attribute.  That's why I missed it.

>>
>> But, I don't see a way to write portions of an XML tree, or iteratively
>> write a tree to disk.
>> How can this be done?
> There are several ways to do it. Python has a couple of external libraries
> available that are made specifically for generating markup incrementally.
>
> lxml also gained that feature recently. It's not documented yet, but here
> are usage examples:
>
> https://github.com/lxml/lxml/blob/master/src/lxml/tests/test_incremental_xmlfile.py
>
> Stefan
Thanks Stefan !  I'll look that over. :)

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


Thread

Re: XML/XHTML/HTML differences, bugs... and howto Andrew Robinson <andrew3@r3dsolutions.com> - 2013-01-23 23:32 +0000

csiph-web