24件ヒット
[1-24件を表示]
(0.024秒)
別のキーワード
クラス
-
REXML
:: Attributes (12) -
REXML
:: Elements (12)
検索結果
-
REXML
:: Elements # []=(index , element) (18151.0) -
集合に要素 element を追加/更新します。
...ト)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a/>'
doc.root.elements[10] = REXML::Element.new('b')
doc.root.to_s # => "<a><b/></a>"
doc.root.elements[1] # => <b/>
doc.root.elements[1] = REXML::Element.new('c')
doc.root.to_s # => "<a><c/></a>"
doc.root.elements['c'] = R......EXML::Element.new('d')
doc.root.to_s # => "<a><d/></a>"
//}... -
REXML
:: Attributes # []=(name , value) (18127.0) -
指定した属性を更新します。
...追加されます。
//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
a.attributes["att"] = "...