るりまサーチ

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

別のキーワード

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

モジュール

キーワード

検索結果

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

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

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

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

REXML::Attribute#prefix -> String (9405.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 # -> "elns"
a = REXML::Attribute.new( "x",...
..."y" )
p a.prefix # -> ""
//}...

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

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

...prefix の集合を
文字列の配列で返します。

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

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

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://ex...
...ample.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}...

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

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

...る 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 # =>...

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

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

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

@see REXML::Namespace#prefix=...

絞り込み条件を変える

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

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

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

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.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}...