Syntax:
//tag[@attribute = 'value']Example:
//input[@id = 'user-message']This would select the input element nodes which has 'user-message' as it’s id attribute value.
Let's get a clear view with the below example:
//li[@id = 'ogbkddg:4']
Here, //li[@id = 'ogbkddg:4'] selects all the 'li' node which has 'ogbkddg:4' as it's attribute id.
No comments:
Post a Comment