Class: Nokogiri::XML::Namespace
- Inherits:
-
Object
- Object
- Nokogiri::XML::Namespace
- Includes:
- PP::Node
- Defined in:
- lib/nokogiri/xml/namespace.rb,
ext/nokogiri/xml_namespace.c
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
-
#href ⇒ Object
Get the href for this namespace.
-
#prefix ⇒ Object
Get the prefix for this namespace.
Methods included from PP::Node
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
7 8 9 |
# File 'lib/nokogiri/xml/namespace.rb', line 7 def document @document end |
Instance Method Details
#href ⇒ Object
Get the href for this namespace
101 102 103 104 105 106 107 108 109 110 |
# File 'ext/nokogiri/xml_namespace.c', line 101
static VALUE
href(VALUE self)
{
xmlNsPtr ns;
Noko_Namespace_Get_Struct(self, xmlNs, ns);
if (!ns->href) { return Qnil; }
return NOKOGIRI_STR_NEW2(ns->href);
}
|
#prefix ⇒ Object
Get the prefix for this namespace. Returns nil
if there is no prefix.
84 85 86 87 88 89 90 91 92 93 |
# File 'ext/nokogiri/xml_namespace.c', line 84
static VALUE
prefix(VALUE self)
{
xmlNsPtr ns;
Noko_Namespace_Get_Struct(self, xmlNs, ns);
if (!ns->prefix) { return Qnil; }
return NOKOGIRI_STR_NEW2(ns->prefix);
}
|