324件ヒット
[201-300件を表示]
(0.170秒)
別のキーワード
ライブラリ
-
rexml
/ document (324)
クラス
-
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: Child (24) -
REXML
:: DocType (12) -
REXML
:: Document (48) -
REXML
:: Element (96) -
REXML
:: Elements (24) -
REXML
:: Parent (36) -
REXML
:: Text (12)
キーワード
- << (48)
- []= (12)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ element (12) -
add
_ namespace (24) -
delete
_ attribute (12) - namespace (12)
-
next
_ sibling= (12) - prefix (12)
-
previous
_ sibling= (12) - push (12)
- text= (12)
-
to
_ string (12) - value= (12)
- write (24)
検索結果
先頭5件
-
REXML
:: Attributes # []=(name , value) (8013.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"] = "9"
a.attributes["foo:attt"] = "8"
a # => <a foo:att='1' bar:att='2' att='9' foo:attt='8'/>
//}
@see REXML::Attributes#add... -
REXML
:: Child # next _ sibling=(other) (8013.0) -
other を self の次の隣接ノードとします。
...ード列の self の後ろに
other を挿入します。
@param other 挿入するノード
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d
p a.to_s #... -
REXML
:: Child # previous _ sibling=(other) (8013.0) -
other を self の前の隣接ノードとします。
...ノード列の self の前に
other を挿入します。
@param other 挿入するノード
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d
p a.to_s #... -
REXML
:: Element # text=(text) (8013.0) -
「先頭の」テキストノードを text で置き換えます。
...:Text, nil(削除))
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/></a>')
doc.to_s # => "<a><b/></a>"
doc.root.text = "Foo"; doc.to_s # => "<a><b/>Foo</a>"
doc.root.text = "Bar"; doc.to_s # => "<a><b/>Bar</a>"
doc.root.add_element "c"
doc.root.text = "Baz"; doc.to_s #... -
REXML
:: Text # value=(val) (8013.0) -
テキストの内容を val に変更します。
...非正規化された(エスケープされていない)文字列を渡さなければ
なりません。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("a")
e.add_text("foo")
e[0].value = "bar"
e.to_s # => "<a>bar</a>"
e[0].value = "<a>"
e.to_s # => "<a><a></a>"
//}... -
REXML
:: Document # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false , encoding=nil) -> () (8007.0) -
output に XML 文書を出力します。
...る XML はデフォルトの XML 宣言を含んでいるべきであるが、
REXML は明示しない限り(つまりXML宣言を REXML::Document#add で
追加しない限り)
それをしない、ということである。XML-RPCのような利用法では
ネットワークバンドを少し... -
REXML
:: Document # write(output: $ stdout , indent: -1 , transitive: false , ie _ hack: false , encoding: nil) -> () (8007.0) -
output に XML 文書を出力します。
...る XML はデフォルトの XML 宣言を含んでいるべきであるが、
REXML は明示しない限り(つまりXML宣言を REXML::Document#add で
追加しない限り)
それをしない、ということである。XML-RPCのような利用法では
ネットワークバンドを少し... -
REXML
:: Attributes # <<(attribute) -> () (8002.0) -
属性を追加/更新します。
属性を追加/更新します。
attribute で更新する属性(REXML::Attribute オブジェクト)を
指定します。既に同じ名前(REXML::Attribute#name)のオブジェクトが
存在する場合は属性が上書きされ、ない場合は追加されます。
@param attribute 追加(更新)する属性(REXML::Attribute オブジェクト)
@see REXML::Attributes#[]= -
REXML
:: Document # <<(child) -> () (8002.0) -
子ノードを追加します。
子ノードを追加します。
追加できるものは
* XML宣言(REXML::XMLDecl)
* DTD(REXML::DocType)
* ルート要素
のいずれかです。