class Nokogiri::XML::EntityDecl
Public Class Methods
# File lib/nokogiri/xml/entity_decl.rb, line 12 def self.new(name, doc, *args) doc.create_entity(name, *args) end
Public Instance Methods
content Show source
static VALUE
get_content(VALUE self)
{
xmlEntityPtr node;
Noko_Node_Get_Struct(self, xmlEntity, node);
if (!node->content) { return Qnil; }
return NOKOGIRI_STR_NEW(node->content, node->length);
} Get the content
entity_type Show source
static VALUE
entity_type(VALUE self)
{
xmlEntityPtr node;
Noko_Node_Get_Struct(self, xmlEntity, node);
return INT2NUM((int)node->etype);
} Get the entity type
external_id Show source
static VALUE
external_id(VALUE self)
{
xmlEntityPtr node;
Noko_Node_Get_Struct(self, xmlEntity, node);
if (!node->ExternalID) { return Qnil; }
return NOKOGIRI_STR_NEW2(node->ExternalID);
} Get the external identifier for PUBLIC
# File lib/nokogiri/xml/entity_decl.rb, line 16
def inspect
"#<#{self.class.name}:#{format("0x%x", object_id)} #{to_s.inspect}>"
end original_content Show source
static VALUE
original_content(VALUE self)
{
xmlEntityPtr node;
Noko_Node_Get_Struct(self, xmlEntity, node);
if (!node->orig) { return Qnil; }
return NOKOGIRI_STR_NEW2(node->orig);
} Get the original_content before ref substitution
system_id Show source
static VALUE
system_id(VALUE self)
{
xmlEntityPtr node;
Noko_Node_Get_Struct(self, xmlEntity, node);
if (!node->SystemID) { return Qnil; }
return NOKOGIRI_STR_NEW2(node->SystemID);
} Get the URI for a SYSTEM or PUBLIC Entity
© 2008–2023 by Mike Dalessio, Aaron Patterson, Yoko Harada, Akinori MUSHA, John Shahid,
Karol Bucek, Sam Ruby, Craig Barnes, Stephen Checkoway, Lars Kanis, Sergio Arbeo,
Timothy Elliott, Nobuyoshi Nakada, Charles Nutter, Patrick MahoneyLicensed under the MIT License.
https://nokogiri.org/rdoc/Nokogiri/XML/EntityDecl.html