[Lxml-checkins] r50516 - lxml/trunk
scoder at codespeak.net
scoder at codespeak.net
Fri Jan 11 15:20:45 CET 2008
Author: scoder
Date: Fri Jan 11 15:20:44 2008
New Revision: 50516
Modified:
lxml/trunk/ (props changed)
lxml/trunk/update-error-constants.py
Log:
r3241 at delle: sbehnel | 2008-01-11 15:20:34 +0100
API usage fix
Modified: lxml/trunk/update-error-constants.py
==============================================================================
--- lxml/trunk/update-error-constants.py (original)
+++ lxml/trunk/update-error-constants.py Fri Jan 11 15:20:44 2008
@@ -65,7 +65,8 @@
PARSE_ENUM_NAME = re.compile('\s*enum\s+(\w+)\s*{', re.I).match
PARSE_ENUM_VALUE = re.compile('\s*=\s+([0-9]+)\s*(?::\s*(.*))?').match
tree = etree.parse(html_file)
- xpath = etree.XPathEvaluator(tree, {'html' : 'http://www.w3.org/1999/xhtml'})
+ xpath = etree.XPathEvaluator(
+ tree, namespaces={'html' : 'http://www.w3.org/1999/xhtml'})
enum_dict = {}
enums = xpath.evaluate("//html:pre[@class = 'programlisting' and contains(text(), 'Enum') and html:a[@name]]")
More information about the lxml-checkins
mailing list