Reputation: 25601
xmllint sample.xml --xpath "//a[text()='some value']/@href"
outputs:
href="http://some.address"
How can I output just the link without attribute name?
Upvotes: 1
Views: 1762
Reputation: 25601
xmllint sample.xml --xpath "string(//a[text()='some value']/@href)"
Upvotes: 2