M
M
Mykola2014-06-19 22:54:26
PHP
Mykola, 2014-06-19 22:54:26

How to compose an xpath query?

<td>
<br>
<h2>Related Anime</h2>
Adaptation:
<a href="/manga/418/Mushishi">Mushishi</a>
<br>
Prequel:
<a href="/anime/457/Mushishi">Mushishi</a>
,
<a href="/anime/21329/Mushishi_Special:_Hihamukage">Mushishi Special: Hihamukage</a>
<br>
Sequel:
<a href="/anime/24687/Mushishi_Zoku_Shou_Specials">Mushishi Zoku Shou Specials</a>
,
<a href="/anime/24701/Mushishi_Zoku_Shou_2nd_Season">Mushishi Zoku Shou 2nd Season</a>
<br>
<br>
<h2>

You need to select those links that have "anime" in the href attribute.
I ate like this: .//*[@id='content']/table/tbody/tr/td[2]/div[2]/table/tbody/tr[2]/td/a[href="anime" ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexP11223, 2014-06-19
@iSensetivity

//a[contains(@href, 'anime')]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question