Fix parsing of action attributes

When parsing XML like this:

    <item>
      <action_key>123</action_key>
      <title>Foo</title>
    </item>

Nokogiri returns not only element nodes (item, action_key, title),
but also text nodes for the whitespace in between the tags.

The parsing code used to not to discriminate between the two types and
try to parse both the same way.