A
Andrew Lonie
Hi I noticed that the xpath functionality of elementtree has been
upgraded in version 1.3. However I can't seem to get the [postion]
predicate to function. All the other new functionality seems to be
working.
Maybe I'm getting the syntax wrong?:
Any help appreciated!
Andrew
upgraded in version 1.3. However I can't seem to get the [postion]
predicate to function. All the other new functionality seems to be
working.
Maybe I'm getting the syntax wrong?:
return first tag element.xml = ET.XML("""<root><tag att="1">text</tag><tagatt="2">text2 said:elem = xml.find("tag[@att]") #Works fine - returns first tag element
elem = xml.find("tag[@att]/..") #Works fine - returns entire doc
elem = xml.find("tag[1]") # FAILS - returns nothing. Should
Any help appreciated!
Andrew