504件ヒット
[201-300件を表示]
(0.224秒)
別のキーワード
ライブラリ
-
rexml
/ document (504)
クラス
-
REXML
:: Attributes (156) -
REXML
:: CData (24) -
REXML
:: DocType (24) -
REXML
:: Document (12) -
REXML
:: Element (192) -
REXML
:: Elements (72) -
REXML
:: Instruction (24)
キーワード
- [] (24)
- []= (24)
-
add
_ attribute (24) -
add
_ element (12) - attribute (12)
- content (12)
- delete (24)
-
delete
_ all (12) -
delete
_ element (12) -
delete
_ namespace (12) - each (24)
-
each
_ attribute (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ text (12) -
has
_ elements? (12) - length (12)
- namespaces (12)
-
next
_ element (12) - prefixes (12)
- public (12)
-
root
_ node (12) - size (24)
- system (12)
- target (12)
- text (12)
- text= (12)
-
to
_ a (24) -
to
_ s (12) - value (12)
- xpath (12)
検索結果
先頭5件
-
REXML
:: Elements # each(xpath = nil) {|element| . . . } -> [REXML :: Elements] (8031.0) -
全ての子要素に対しブロックを呼び出します。
...emlist[][ruby]{
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
# <b/>,<c/>,<d/>,<b/>,<c/>, <d/> がブロックに渡される
doc.root.elements.each {|e|p e}
# <b/>, <b/> がブロックに渡される
doc.root.elements.each('b') {|e|p......e} #-> Yields b, b elements
# <b/>,<c/>,<d/>,<b/>,<c/>,<d/> がブロックに渡される
doc.root.elements.each('child::node()') {|e|p e}
# <b/>,<c/>,<d/>,"sean",<b/>,<c/>,<d/> がブロックに渡される
REXML::XPath.each(doc.root, 'child::node()'){|node| p node }
//}... -
REXML
:: Attributes # [](name) -> String | nil (8025.0) -
属性名nameの属性値を返します。
...名(文字列)
//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 a.attributes["att"] # => "<"... -
REXML
:: Attributes # []=(name , value) (8025.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.attr... -
REXML
:: Attributes # delete(attribute) -> REXML :: Element (8025.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.delete("att")... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (8025.0) -
name という名前を持つ属性をすべて削除します。
...性の名前
//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.delete_all("att") #... -
REXML
:: Attributes # each {|name , value| . . . } -> () (8025.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.each do |name, value... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (8025.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.each_attribute do |a... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (8025.0) -
name という名前の属性を取得します。
...Attributes#[]
//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.get_attribute("at... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (8025.0) -
namespace と name で特定される属性を返します。
...名(文字列)
//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.get_attribute_ns(...