title: How to use xpath to get a specific xsd element?
body: <p>I am trying to find a specific xsd element of specific parent xsd elements 
  using xpath but could not find a solution.</p>
  
  <pre><code>&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xs:element name="XYZ"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="XX" minOccurs="0"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element name="AA"&gt;
                  &lt;xs:complexType&gt;
                    &lt;xs:attribute type="xs:string" name="testA" use="required" /&gt;
                    &lt;xs:attribute type="xs:string" name="testB" use="required" /&gt;
                  &lt;/xs:complexType&gt;
                &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name="YY" minOccurs="0" /&gt;
          &lt;xs:element name="ZZ"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                &lt;xs:element name="AA" /&gt;
              &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>I tried the following xpath: </p>
  
  <pre><code>/xs:element[@name='XYZ']/xs:element[@name='XX']/xs:element[@name='AA']
  </code></pre>
  
  <p>but the result is an empty list.</p>
  
  <p>I hope somebody can help me.</p>