Using XPath to get the first child for every child of a node
<p>I'm trying to parse some HTML with the following structure, how can I extract the first <code>&lt;a&gt;</code> element of every <code>&lt;li&gt;</code> element using xpath?</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;
        &lt;a&gt;
        &lt;span&gt;
        &lt;a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a&gt;
        &lt;span&gt;
        &lt;a&gt;
    &lt;/li&gt;
    ...
&lt;/ul&gt;
</code></pre>