Q:

Get content of an element following element with some content

I have to get values from HTML document, I can't use full xpath expression because my script would be more vulnerable in case of change in original document. Here is what the html file looks like:
<div id="wrapper">
    <div class="block">
        <div class="title">Kind:</div>
        <div class="value">
            <a href="http://google.com">Book</a>
        </div>

        ...
    </div>
</div>

The idea what I need to do to get Book is to get the content of the a subnode of the node following the node with content of Kind:. Can it be done with a single xpath expression?

A:

You can use this XPath:
//div[. = 'Kind:']/following-sibling::div/a/text()

It will select div/a/text() with preceding div with content Kind:

