るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
9件ヒット [1-9件を表示] (0.017秒)

別のキーワード

  1. uri build
  2. uri extract
  3. uri new
  4. open-uri open
  5. uri regexp

検索結果

REXML::Element#add_namespace(prefix, uri) -> self (388.0)

名前空間を要素に追加します。

...る場合はそれが上書きされます。

@param prefix 名前空間の prefix
@param uri 名前空間の uri

//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle...

REXML::Element#add_namespace(uri) (388.0)

名前空間を要素に追加します。

...る場合はそれが上書きされます。

@param prefix 名前空間の prefix
@param uri 名前空間の uri

//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle...

REXML::Attribute#namespace(arg = nil) -> String | nil (94.0)

属性の名前空間の URI を返します。

...間でなく、arg という名前空間
の URI が返されます。
通常は省略します。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attrib...

REXML::Element#namespace(prefix=nil) -> String (76.0)

self の文脈で prefix が指している名前空間の URI を返します。

...返します。

prefix で指示される名前空間の宣言が存在しない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.name...

REXML::Entity#ref -> String | nil (58.0)

外部実体(external entity)宣言の URI を返します。

外部実体(external entity)宣言の URI を返します。

内部実体宣言の場合は nil を返します。

絞り込み条件を変える

REXML::NotationDecl#system -> String | nil (58.0)

システム識別子(URI)を返します。

システム識別子(URI)を返します。

宣言がシステム識別子を含まない場合は nil を返します。

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (46.0)

name で指定される属性を返します。

...場合は nil を返します。

@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att=...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (28.0)

namespace と name で特定される属性を返します。

...定することができます。

@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att...

REXML::Attributes#namespaces -> { String => String } (28.0)

self の中で宣言されている名前空間の集合を返します。

...返します。

返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att=...