title: How can I select only specific subelements in XQuery?
body: <p>Say I have elements <code>&lt;country&gt;</code>, and that those elements have all lots of subelements like <code>&lt;name&gt;</code>, <code>&lt;population&gt;</code>, <code>&lt;cities&gt;</code>, some of which have their own subelements. If I call</p>
  
  <pre><code>for $x in doc("myfile.xml")/world
  return &lt;country&gt; { $c/country } &lt;/country&gt;
  </code></pre>
  
  <p>Then I'll get all of those countries, with all of their subelements, their subelements, and so on. However, say I just want to select all of the cities in the country, but including the subelements of those cities. How can I do this?</p>