Install
sudo gem install nokogiri
Contribute
github.com/sparklemotion/nokogiri

An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath or CSS3 selectors… and much more

Nokogiri

Class Nokogiri::XML::EntityDecl inherits from Nokogiri::XML::Node

Public Class Methods

new(name, doc, *args) Show Source
# File lib/nokogiri/xml/entity_decl.rb, line 10 def self.new name, doc, *args doc.create_entity(name, *args) end

Public Instance Methods

content() Show Source

Get the content

static VALUE get_content(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->content) return Qnil; return NOKOGIRI_STR_NEW(node->content, node->length); }
entity_type() Show Source

Get the entity type

static VALUE entity_type(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); return INT2NUM((int)node->etype); }
external_id() Show Source

Get the external identifier for PUBLIC

static VALUE external_id(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->ExternalID) return Qnil; return NOKOGIRI_STR_NEW2(node->ExternalID); }
inspect() Show Source
# File lib/nokogiri/xml/entity_decl.rb, line 14 def inspect "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{to_s.inspect}>" end
original_content() Show Source

Get the original_content before ref substitution

static VALUE original_content(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->orig) return Qnil; return NOKOGIRI_STR_NEW2(node->orig); }
system_id() Show Source

Get the URI for a SYSTEM or PUBLIC Entity

static VALUE system_id(VALUE self) { xmlEntityPtr node; Data_Get_Struct(self, xmlEntity, node); if(!node->SystemID) return Qnil; return NOKOGIRI_STR_NEW2(node->SystemID); }