title: Nokogiri search for word content controls
body: <p>I want to find all Microsoft Word content control nodes in a document.xml. Because I am going to preprocess these controls, I need to find these guys recursively from a given xml node, BUT I want to stop at the first occurence.</p>
  
  <p>Sample data : (The content control node is the <code>&lt;w:sdt&gt;</code> one)</p>
  
  <p><em>Assume these are the nodes I can see from a node X :</em></p>
  
  <pre><code>&lt;w:tc&gt;
    &lt;w:tcPr&gt;
    ...
    &lt;/w:tcPr&gt;
    &lt;!-- A content control node I want to get --&gt;
    &lt;w:sdt&gt;
      &lt;w:sdtPr&gt;
      ...
      &lt;/w:sdtPr&gt;
      &lt;w:sdtEndPr/&gt;
      &lt;w:sdtContent&gt;
        ...
        &lt;!--- Embedded in a content control. I don't want it now ---&gt;
        &lt;w:sdt&gt; 
          ...
        &lt;/w:sdt&gt;
      &lt;/w:sdtContent&gt;
    &lt;/w:sdt&gt;
    ...
    &lt;!-- Another content control ! It isn't embedded in a &lt;w:sdt&gt;, so I want this one --&gt;
    &lt;w:sdt&gt;
    &lt;/w:sdt&gt;
  &lt;/w:tc&gt;
  ...
  &lt;!--- Another one ! Not at the same depth, but not embedded so I want it ! --&gt;
  &lt;w:sdt&gt;
  ...
  &lt;/w:sdt&gt;
  </code></pre>
  
  <p>I want 3 out of the 4 nodes given above. If I just do a <code>nodeX.search('.//sdt')</code>, I will grab all 4 right ? How can I exclude the embedded one ?</p>