Nokogiri::XML::Namespace

class Nokogiri::XML::Namespace

Parent:
Object
Included modules:
Nokogiri::XML::PP::Node

Attributes

document[R]

Public Instance Methods

Get the href for this namespace

static VALUE href(VALUE self)
{
  xmlNsPtr ns;

  Data_Get_Struct(self, xmlNs, ns);
  if(!ns->href) return Qnil;

  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;

  Data_Get_Struct(self, xmlNs, ns);
  if(!ns->prefix) return Qnil;

  return NOKOGIRI_STR_NEW2(ns->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

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部