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

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -