504件ヒット
[1-100件を表示]
(0.066秒)
ライブラリ
-
rexml
/ document (504)
キーワード
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ element (12) -
add
_ namespace (24) - attribute (12)
- attributes (12)
- cdatas (12)
- clone (12)
- comments (12)
- context (12)
- context= (12)
-
delete
_ attribute (12) -
delete
_ element (12) -
delete
_ namespace (12) - document (12)
-
each
_ element (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - elements (12)
-
get
_ elements (12) -
get
_ text (12) -
has
_ attributes? (12) -
has
_ elements? (12) -
has
_ text? (12) - instructions (12)
- namespace (12)
- namespaces (12)
-
next
_ element (12) -
node
_ type (12) - prefixes (12)
-
previous
_ element (12) - raw (12)
- root (12)
-
root
_ node (12) - text (12)
- text= (12)
- texts (12)
- whitespace (12)
- write (12)
- xpath (12)
検索結果
先頭5件
-
REXML
:: Element # add _ attribute(attr) -> () (2.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
要素の属性を追加します。
同じ名前の属性がすでにある場合はその属性を新しい
属性で置き換えます。
引数の与えかたは2通りあります。
要素名と値の2つの文字列で渡す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = ... -
REXML
:: Element # add _ attribute(key , value) -> () (2.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
要素の属性を追加します。
同じ名前の属性がすでにある場合はその属性を新しい
属性で置き換えます。
引数の与えかたは2通りあります。
要素名と値の2つの文字列で渡す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = ... -
REXML
:: Element # add _ attributes(attrs) -> () (2.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...属性の属性名と属性値の対の集合(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
:: Element # add _ element(element , attrs = nil) -> Element (2.0) -
子要素を追加します。
...子要素を追加します。
element として追加する要素を指定します。
REXML::Element オブジェクトもしくは文字列を指定します。
element として REXML::Element オブジェクトを指定した場合、それが追加されます。
文字列を指定した場......'val1' attr2='val2'/>
doc.root.to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/></a>"
el = REXML::Element.new 'my-tag'
doc.root.add_element el # => <my-tag/>
doc.root.to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/><my-tag/></a>"
//}
@see REXML::Elements#add, REXML::Element.new... -
REXML
:: Element # add _ namespace(prefix , uri) -> self (2.0) -
名前空間を要素に追加します。
...上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.to_s # => "<a xm... -
REXML
:: Element # add _ namespace(uri) (2.0) -
名前空間を要素に追加します。
...上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.to_s # => "<a xm... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (2.0) -
name で指定される属性を返します。
name で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という属性名を持つ属性を指定できます。
指定した属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = R... -
REXML
:: Element # attributes -> REXML :: Attributes (2.0) -
要素が保持している属性の集合を返します。
要素が保持している属性の集合を返します。 -
REXML
:: Element # cdatas -> [REXML :: CData] (2.0) -
すべての cdata 子ノードの配列を返します。
すべての cdata 子ノードの配列を返します。
返される配列は freeze されます。