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 -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -