How can I find the elements with different attributes with lxml on python ?
for example
<Form>
<Subform ind="0">
<Check ind="0">0</Check>
<Check ind="1">1</Check>
<Check ind="2">2</Check>
<Check ind="3">3</Check>
</Subform>
</Form>
to retrieve the Checks I do:
tree.findall("./Form/Subform/Check")
to get the first:
tree.findall("./Form/Subform/Check[@ind='0']")
but what I want to do is something like
tree.findall("./Form/Subform/Check[@ind='0' or @ind='1']")
To retrieve the first and second only (or first and last)
How can I do that with lxml ?