Install
sudo gem install nokogiri
Contribute
github.com/tenderlove/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::Namespace inherits from Object

Attributes

document R

Public Instance Methods

href() Show Source

Get the href for this namespace

static VALUE href(VALUE self) { xmlNsPtr ns; xmlDocPtr doc; Data_Get_Struct(self, xmlNs, ns); if(!ns->href) return Qnil; Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc); return NOKOGIRI_STR_NEW2(ns->href); }
prefix() Show Source

Get the prefix for this namespace. Returns nil if there is no prefix.

static VALUE prefix(VALUE self) { xmlNsPtr ns; xmlDocPtr doc; Data_Get_Struct(self, xmlNs, ns); if(!ns->prefix) return Qnil; Data_Get_Struct(rb_iv_get(self, "@document"), xmlDoc, doc); return NOKOGIRI_STR_NEW2(ns->prefix); }