Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To obtain the value of an attribute using Xpath, you can use the following syntax:

@attribute_name

For example, if you want to obtain the value of the "href" attribute of an anchor element, you can use the following Xpath expression:

//a/@href

This will return the value of the "href" attribute of all anchor elements in the document.