176件ヒット
[1-100件を表示]
(0.047秒)
種類
- インスタンスメソッド (154)
- 文書 (11)
- モジュール (11)
ライブラリ
-
rexml
/ document (143) -
webrick
/ accesslog (11) -
webrick
/ httprequest (11)
クラス
-
REXML
:: Attribute (11) -
REXML
:: Attributes (132) -
WEBrick
:: HTTPRequest (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - AccessLog (11)
- [] (11)
- []= (11)
- delete (11)
-
delete
_ all (11) - each (11)
-
each
_ attribute (11) -
get
_ attribute (11) -
get
_ attribute _ ns (11) - length (11)
- namespace (11)
- namespaces (11)
- prefixes (11)
- size (11)
検索結果
先頭5件
-
WEBrick
:: HTTPRequest # attributes -> Hash (21101.0) -
@todo ???
@todo ??? -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (3054.0) -
namespace と name で特定される属性を返します。
...<<-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("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "at......t") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}... -
REXML
:: Attributes # delete(attribute) -> REXML :: Element (3036.0) -
指定した属性を取り除きます。
...="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") # => <a foo:att='1' bar:att='2'/>
a.attributes.delete("foo:att") # => <a bar:att='2'/>
attr = a.attributes.g......et_attribute("bar:att")
a.attributes.delete(attr) # => <a/>
//}... -
REXML
:: Attributes # namespaces -> { String => String } (3036.0) -
self の中で宣言されている名前空間の集合を返します。
...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 doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces... -
REXML
:: Attributes # [](name) -> String | nil (3030.0) -
属性名nameの属性値を返します。
...な場合は
REXML::Attributes#get_attribute を使ってください。
nameという属性名の属性がない場合は nil を返します。
@param 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"] # => "<"
p a.attributes["bar:att"] # => "2"
//}... -
REXML
:: Attributes # []=(name , value) (3030.0) -
指定した属性を更新します。
...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... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (3030.0) -
各属性に対しブロックを呼び出します。
...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 |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (3030.0) -
name という名前の属性を取得します。
...e REXML::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_attr......ibute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: Attributes # prefixes -> [String] (3024.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...'
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 doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (3018.0) -
name という名前を持つ属性をすべて削除します。
...ml/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") # => [att='<']
a # => <a foo:att='1' bar:a...