title: Nokogiri and finding element by name
body: <p>I am parsing an XML file using Nokogiri with the following snippet:</p>
  
  <pre><code>doc.xpath('//root').each do |root|
    puts "# ROOT found"
    root.xpath('//page').each do |page|
      puts "## PAGE found / #{page['id']} / #{page['name']} / #{page['width']} / #{page['height']}"
      page.children.each do |content|
        ...
      end
    end
  end
  </code></pre>
  
  <p>How can I parse through all elements in the page element? There are three different elements: image, text and video. How can I make a case statement for each element?</p>