title: How can I select the first elements in a set of groups?
body: <p>Consider an Xml document that contains an element <code>&lt;A&gt;</code>. This element contains several elements all named <code>&lt;B&gt;</code>. Each of these elements contains a number of elements.</p>
  
  <p>I want to get a node set, containing the first element in every <code>&lt;B&gt;</code> element, in order of appearance.</p>