Python XPath with ElementTree Invalidate Predicate -
i have probleme max value of categorylevel write says invalidate predicate.
document=xmlparser.parse("categories.xml")
xpathquery="{0}categoryarray/{0}category[not({0}categoryarray/{0}category/{0}categorylevel>{0}categorylevel)]".format(namespace) categories=root.find(xpathquery)
the xml file
<getcategoriesresponse xmlns="urn:xxxxxxxx:xxxxx:xxxxxxxx"> <categoryarray> <category> <categorylevel>1</categorylevel> </category> <category> <categorylevel>2</categorylevel> </category> <category> <categorylevel>3</categorylevel> </category> <category> <categorylevel>2</categorylevel> </category>
i want check if xpath query suitable extract maximum value of categorylevel or not, , don't understand answer of other post. please tell me source of error?! cordially
Comments
Post a Comment