るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.043秒)
トップページ > バージョン:2.2.0[x] > クエリ:String[x] > クエリ:prefix[x] > ライブラリ:rexml/document[x]

別のキーワード

  1. string []=
  2. string slice!
  3. string []
  4. string slice
  5. string gsub

モジュール

キーワード

検索結果

REXML::Namespace#prefix -> String (54679.0)

prefix (前置修飾子) を返します。

prefix (前置修飾子) を返します。

@see REXML::Namespace#prefix=

REXML::Attribute#prefix -> String (54667.0)

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

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

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "...

REXML::Element#prefixes -> [String] (18676.0)

self の文脈で定義されている prefix を文字列の配列を返します。

...字列の配列を返します。

対象の要素とその外側の要素で定義されている prefix を返します。

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

REXML::Attributes#prefixes -> [String] (18658.0)

self の中で宣言されている prefix の集合を 文字列の配列で返します。

...返します。

self が属する要素より上位の要素で定義されているものは含みません。

//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::Element#namespace(prefix=nil) -> String (697.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::Attributes#namespaces -> { String => String } (631.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=...

REXML::Element#namespaces -> {String => String} (631.0)

self の文脈で定義されている名前空間の情報を返します。

...定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。

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

REXML::Namespace#expanded_name -> String (382.0)

REXML::Namespace#name= で設定された名前を返します。

REXML::Namespace#name= で設定された名前を返します。

name= で指定した名前が prefix を含んでいれば
prefix を含む名前を返し、そうでなければ
prefix を含まない名前を返します。

@see REXML::Namespace#prefix

REXML::Namespace#local_name -> String (361.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

REXML::Namespace#name -> String (361.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

絞り込み条件を変える

REXML::Attribute#namespace(arg = nil) -> String | nil (328.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...