Is there an xpath way to select a given attribute value?
For example I have an html document and want to select only “?ms=669601” :
<input type="button" value="تفاصيل" onclick="xmlreqGET("?ms=669601","jm1x");">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your simple example, you could simply select that portion of the
onclickattribute in the onlyinput:In more complicated documents, try selecting first by
@value(or some other (possibly unique) criteria):Or by targeting the
inputthat contains part of the desired substring:Selecting the
inputelement itself if itsonclickattribute contains the target string:Note: Your input is not valid XML, due to nested double-quotes.