My favorites | Sign in
Project Home Downloads Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 5: Can't parse xml file in python2.7
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by muden...@gmail.com, Mar 13, 2011
python2.7

import xpath
from xml.dom import minidom

xml = minidom.parseString("<Rerservations><Rerservation><endDate>2011-03-15T11:00:00+08:00</endDate></Rerservation></Rerservations>")
xpath.find(xml,"/Reservations/endDate")


Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    xpath.find(xml,"/Reservations/Reservation/endDate")
  File "C:\Python27\lib\site-packages\xpath\__init__.py", line 23, in api_function
    raise e
XPathParseError: Syntax error:
<xml.dom.minidom.Document instance at 0x014A53C8>
^




Mar 14, 2011
#2 muden...@gmail.com
opps...

expression arg shoud be first.

Apr 6, 2011
#3 trueflyi...@gmail.com
does your comment mean this isn’t an issue or was it simply a typo and the module does indeed not work under python 2.7?

afaik this is the only python xpath implementation with painless namespace support (wildcards and default namespace), so i will need it.
Sign in to add a comment

Powered by Google Project Hosting