44件ヒット
[1-44件を表示]
(0.095秒)
ライブラリ
-
rdoc
/ context (11) -
rexml
/ document (33)
クラス
-
RDoc
:: Context (11) -
REXML
:: Attribute (11) -
REXML
:: Element (22)
キーワード
-
add
_ to (11) -
delete
_ attribute (11) - prefix (11)
検索結果
先頭4件
-
REXML
:: Element # add _ attribute(key , value) -> () (18320.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c");......doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (230.0) -
要素から key という属性名の属性を削除します。
...要素から key という属性名の属性を削除します。
削除された属性を返します。
key という属性名の属性が存在しない場合は削除されずに、nil を返します。
@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)......//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x='foo' y:x='bar'/>
e.delete_attribute("x"); e # => <E y:x='bar'/>
//}... -
RDoc
:: Context # add _ to(array , thing) -> () (206.0) -
array に thing を追加します。
...array に thing を追加します。
@param array 配列を指定します。
@param thing 追加する要素を指定します。
RDoc::Context#add_alias などで使われています。ライブラリ内部で使
用します。
@see RDoc::Context#add_alias, RDoc::Context#add_attribute,... -
REXML
:: Attribute # prefix -> String (118.0) -
属性の名前空間を返します。
...st[][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 # -> ""
//}...