ilinsky / jquery-xpath

jQuery XPath plugin (with full XPath 2.0 language support)
180 stars 64 forks source link

get xpath of element? #5

Closed doesntwork closed 10 years ago

doesntwork commented 10 years ago

is it possible to generate an xpath string of an element?

$('#someid').getXpath();

ilinsky commented 10 years ago

This feature is outside the scope of the project. Take a look at http://stackoverflow.com/questions/3454526/how-to-calculate-the-xpath-position-of-an-element-using-javascript question, it may help you.