Method: Nokogiri::XML::Node#content

Defined in:
ext/nokogiri/xml_node.c

#contentObject Also known as: text, inner_text

Returns the content for this Node


1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
# File 'ext/nokogiri/xml_node.c', line 1121

static VALUE get_native_content(VALUE self)
{
  xmlNodePtr node;
  xmlChar * content;

  Data_Get_Struct(self, xmlNode, node);

  content = xmlNodeGetContent(node);
  if(content) {
    VALUE rval = NOKOGIRI_STR_NEW2(content);
    xmlFree(content);
    return rval;
  }
  return Qnil;
}