W3cubDocs

/Nokogiri

class Nokogiri::XML::ElementDecl

Parent:
Nokogiri::XML::Node

Public Instance Methods

content Show source
static VALUE content(VALUE self)
{
  xmlElementPtr node;
  Data_Get_Struct(self, xmlElement, node);

  if(!node->content) return Qnil;

  return Nokogiri_wrap_element_content(
      rb_funcall(self, id_document, 0),
      node->content
  );
}

The allowed content for this ElementDecl

element_type Show source
static VALUE element_type(VALUE self)
{
  xmlElementPtr node;
  Data_Get_Struct(self, xmlElement, node);
  return INT2NUM((long)node->etype);
}

The #element_type

inspect() Show source
# File lib/nokogiri/xml/element_decl.rb, line 8
def inspect
  "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{to_s.inspect}>"
end
prefix Show source
static VALUE prefix(VALUE self)
{
  xmlElementPtr node;
  Data_Get_Struct(self, xmlElement, node);

  if(!node->prefix) return Qnil;

  return NOKOGIRI_STR_NEW2(node->prefix);
}

The namespace prefix for this ElementDecl

© 2008–2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,
Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis
Licensed under the MIT License.