Method: Nokogiri::XML::Node#parent
- Defined in:
- ext/nokogiri/xml_node.c
permalink #parent ⇒ Object
Get the parent Node for this Node
1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 |
# File 'ext/nokogiri/xml_node.c', line 1609
static VALUE
get_parent(VALUE self)
{
xmlNodePtr node, parent;
Noko_Node_Get_Struct(self, xmlNode, node);
parent = node->parent;
if (!parent) { return Qnil; }
return noko_xml_node_wrap(Qnil, parent) ;
}
|