Would someone please explain the following syntax error that appears
when importing the etree module:
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> from lxml import etree
>>> parser = etree.XMLParser()
>>> tree = etree.XML("<root></b>", parser)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
tree = etree.XML("<root></b>", parser)
File "lxml.etree.pyx", line 2723, in lxml.etree.XML
(src/lxml/lxml.etree.c:52448)
File "parser.pxi", line 1573, in lxml.etree._parseMemoryDocument
(src/lxml/lxml.etree.c:79932)
File "parser.pxi", line 1452, in lxml.etree._parseDoc
(src/lxml/lxml.etree.c:78774)
File "parser.pxi", line 960, in lxml.etree._BaseParser._parseDoc
(src/lxml/lxml.etree.c:75389)
File "parser.pxi", line 564, in
lxml.etree._ParserContext._handleParseResultDoc
(src/lxml/lxml.etree.c:71739)
File "parser.pxi", line 645, in lxml.etree._handleParseResult
(src/lxml/lxml.etree.c:72614)
File "parser.pxi", line 585, in lxml.etree._raiseParseError
(src/lxml/lxml.etree.c:71955)
XMLSyntaxError: Opening and ending tag mismatch: root line 1 and b,
line 1, column 11
--
M McLoughlin
“This e-mail is intended for the exclusive use of the individual to
whom it is addressed. The information contained herein may be
proprietary, confidential, and exempt from disclosure under applicable
law. If the reader of this e-mail has received this communication in
error, please immediately notify the sender by telephone or by e-mail
and destroy this message”