title: Test if a child node exists (without getting NoMethodError)
body: <pre class="lang-xml prettyprint-override"><code>&lt;root&gt;
    &lt;channel&gt;
      &lt;one&gt;example&lt;/one&gt;
      &lt;two&gt;example2&lt;/two&gt;
    &lt;/channel&gt;
    &lt;channel&gt;
      &lt;one&gt;example&lt;/one&gt;
    &lt;/channel&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>In the second node, I don't have a <code>&lt;two&gt;</code> node. If I use this: <code>root.channel.two</code> obviously I get the error "Method missing". How can I check to avoid this error? What is the conditional statement I would use?</p>