What is the proper XPath syntax to grab the value of the href attribute from the following HTMLNode:
<a target="_blank" class="monkeys" href="http://someurl.com" id="123">
<span class="title">Monkeys are flying all over!</span>
</a>
What is the proper XPath syntax to grab the value of the href attribute from the following HTMLNode:
<a target="_blank" class="monkeys" href="http://someurl.com" id="123">
<span class="title">Monkeys are flying all over!</span>
</a>
Is //a@href
what you're looking for?
Using HTMLAgilityPack, the method you'd use is:
HTMLAgilityPack.HTMLNode.GetAttributeValue("href", "")