<p>I am having trouble using the attribute XPath Selector in ElementTree, which I should be able to do according to the <a href="http://effbot.org/zone/element-xpath.htm" rel="noreferrer">Documentation</a></p>

<p>Here's some sample code</p>

<p><strong>XML</strong></p>

<pre><code>&lt;root&gt;
 &lt;target name="1"&gt;
    &lt;a&gt;&lt;/a&gt;
    &lt;b&gt;&lt;/b&gt;
 &lt;/target&gt;
 &lt;target name="2"&gt;
    &lt;a&gt;&lt;/a&gt;
    &lt;b&gt;&lt;/b&gt;
 &lt;/target&gt;
&lt;/root&gt;
</code></pre>

<p><strong>Python</strong></p>

<pre><code>def parse(document):
    root = et.parse(document)
    for target in root.findall("//target[@name='a']"):
        print target._children
</code></pre>

<p>I am receiving the following Exception:</p>

<pre><code>expected path separator ([)
</code></pre>

The syntax you're trying to use is new in
ElementTree 1.3
.
Such version is shipped with
Python 2.7
or higher.
If you have Python 2.6 or less you still have ElementTree 1.2.6 or less.