[Lxml-checkins] r51094 - in lxml/trunk: . src/lxml
scoder at codespeak.net
scoder at codespeak.net
Mon Jan 28 11:20:40 CET 2008
Author: scoder
Date: Mon Jan 28 11:20:38 2008
New Revision: 51094
Modified:
lxml/trunk/ (props changed)
lxml/trunk/src/lxml/lxml.objectify.pyx
Log:
r3348 at delle: sbehnel | 2008-01-28 10:39:23 +0100
let objectify.makeparser() create a 'remove_blank_text' XML parser by default
Modified: lxml/trunk/src/lxml/lxml.objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/lxml.objectify.pyx (original)
+++ lxml/trunk/src/lxml/lxml.objectify.pyx Mon Jan 28 11:20:38 2008
@@ -1627,8 +1627,12 @@
"""Create a new XML parser for objectify trees.
You can pass all keyword arguments that are supported by
- ``etree.XMLParser()``.
+ ``etree.XMLParser()``. Note that this parser defaults to removing
+ blank text. You can disable this by passing the
+ ``remove_blank_text`` boolean keyword option yourself.
"""
+ if 'remove_blank_text' not in kw:
+ kw['remove_blank_text'] = True
parser = etree.XMLParser(**kw)
parser.set_element_class_lookup( ObjectifyElementClassLookup() )
return parser
More information about the lxml-checkins
mailing list