I have an XPath expression as shown below.
if(replace(//p[1]/text(),'H','h') = 'hello') then //p[1]/text() else if(//p[1]/text() = 'world') then //p[2]/text() else 'notFound'
I want to display which 'if ' expression worked.
e.g //p[1]/text() if first 'if' expression worked.
'If' expression can have nested if, for loops and xpath2.0 functions.
I can't find any xpath2.0 library for python. So I tried to convert this Js library to python still I can able to split xpath2.0 expression to lexers but can't convert it fully to python.
Suggest me some Xpath2.0 library for python, if available. Also how to interpret XPath expression and display which part of the expression worked?