Skip to content Skip to sidebar Skip to footer

Lxml Html Xpath Context

I'm using lxml to parse a HTML file and I'd like to know how can I set the context of xpath search. What I mean I that I have a node element and want to make xpath search only insi

Solution 1:

XPath expression //input will match all input elements, anywhere in your document, while .//input will match all inside current context.

Maybe if you improve your scenario description we can help you further.

Post a Comment for "Lxml Html Xpath Context"