3件ヒット
[1-3件を表示]
(0.176秒)
検索結果
先頭3件
-
REXML
:: Attributes # [](name) -> String | nil (63658.0) -
属性名nameの属性値を返します。
属性名nameの属性値を返します。
属性値ではなく REXML::Attribute オブジェクトが必要な場合は
REXML::Attributes#get_attribute を使ってください。
nameという属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://exa... -
REXML
:: Attributes # []=(name , value) (27658.0) -
指定した属性を更新します。
指定した属性を更新します。
name で属性の名前を、value で値を更新します。
既に同じ名前の属性がある場合は上書きされ、
そうでない場合は属性が追加されます。
//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='2' att='<'/>
</root>
EO... -
REXML
:: Attributes # prefixes -> [String] (9358.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
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='2' att='<'/>
</root>
EOS
a = doc...