Method: Nokogiri::XML::Node#next_element

Defined in:
ext/nokogiri/xml_node.c

#next_elementObject

Returns the next Nokogiri::XML::Element type sibling node.

[View source]

1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'ext/nokogiri/xml_node.c', line 1050

static VALUE
next_element(VALUE self)
{
  xmlNodePtr node, sibling;
  Noko_Node_Get_Struct(self, xmlNode, node);

  sibling = xmlNextElementSibling(node);
  if (!sibling) { return Qnil; }

  return noko_xml_node_wrap(Qnil, sibling);
}