44件ヒット
[1-44件を表示]
(0.097秒)
ライブラリ
-
rexml
/ document (22) -
rexml
/ sax2listener (11) -
webrick
/ httprequest (11)
クラス
-
REXML
:: Attributes (11) -
REXML
:: Element (11) -
WEBrick
:: HTTPRequest (11)
モジュール
-
REXML
:: SAX2Listener (11)
キーワード
-
add
_ attributes (11) - namespaces (11)
-
start
_ element (11)
検索結果
先頭4件
-
WEBrick
:: HTTPRequest # attributes -> Hash (18203.0) -
@todo ???
@todo ??? -
REXML
:: Element # add _ attributes(attrs) -> () (6132.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...。
同じ名前の属性がすでにある場合はその属性を新しい
属性で置き換えます。
attrs には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "valu......属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}... -
REXML
:: Attributes # namespaces -> { String => String } (3019.0) -
self の中で宣言されている名前空間の集合を返します。
...
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='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.......namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: SAX2Listener # start _ element(uri , localname , qname , attributes) -> () (108.0) -
要素が開始されたときに呼び出されるコールバックメソッドです。
...@param localname 接頭辞を取り除いた要素名文字列が渡されます
@param qname 修飾名(qualified-name)文字列、つまり接頭辞を含む文字列が渡されます
@param attribute 属性が { 属性名 => 属性値文字列 } という Hash で
で渡されます。...