title: Nokogiri children method
body: <p>I have the following XML here:</p>
  
  <pre><code>&lt;listing&gt;
      &lt;seller_info&gt;
      &lt;payment_types&gt;Visa, Mastercard, , , , 0, Discover, American Express &lt;/payment_types&gt;
      &lt;shipping_info&gt;siteonly, Buyer Pays Shipping Costs &lt;/shipping_info&gt;
      &lt;buyer_protection_info/&gt;
      &lt;auction_info&gt;
      &lt;bid_history&gt;
      &lt;item_info&gt;
  &lt;/listing&gt;
  </code></pre>
  
  <p>The following code works fine for displaying first child of the first <code>//listing</code> node:</p>
  
  <pre><code>require 'nokogiri'
  require 'open-uri' 
  
  html_data = open('http://aiweb.cs.washington.edu/research/projects/xmltk/xmldata/data/auctions/321gone.xml')
  
  nokogiri_object = Nokogiri::XML(html_data)
  listing_elements = nokogiri_object.xpath("//listing")
  
  puts listing_elements[0].children[1]
  </code></pre>
  
  <p>This also works:</p>
  
  <pre><code>puts listing_elements[0].children[3]
  </code></pre>
  
  <p>I tried to access the second node <code>&lt;payment_types&gt;</code> with the the following code: </p>
  
  <pre><code>puts listing_elements[0].children[2]
  </code></pre>
  
  <p>but a blank line was displayed. Looking through Firebug, it is clearly the 2nd child of the listing node. In general, only odd numbers work with the children method.</p>
  
  <p>Is this a bug in Nokogiri? Any thoughts?</p>