Nokogiri::XML::ElementDecl

class Nokogiri::XML::ElementDecl

Parent:
Nokogiri::XML::Node

Public Instance Methods

content Show source

The allowed content for this ElementDecl

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
  );
}
element_type Show source

The #element_type

static VALUE element_type(VALUE self)
{
  xmlElementPtr node;
  Data_Get_Struct(self, xmlElement, node);
  return INT2NUM((long)node->etype);
}
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

The namespace prefix for this ElementDecl

static VALUE prefix(VALUE self)
{
  xmlElementPtr node;
  Data_Get_Struct(self, xmlElement, node);

  if(!node->prefix) return Qnil;

  return NOKOGIRI_STR_NEW2(node->prefix);
}

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部