What I am trying to do is to use HtmlUnit to get the href from the parent anchor of a span. Here is what I mean.
<a href="http://link.com/serv?id=jibberish&type=dynamic/changeseachvisit"&开发者_运维知识库gt;<span>Some Unique Text</span></a>
There is no id or name associated with either the or the tags, so going by this example, how would you find that link in a sea of others like it without ids or names? Thanks!
use the XPATH //span[contains(.,'Transcript')]/parent::a/@href
(non tested, but XPATH is definitely the way to go)
精彩评论