るりまサーチ

最速Rubyリファレンスマニュアル検索!
1020件ヒット [301-400件を表示] (0.029秒)
トップページ > クエリ:attributes[x]

別のキーワード

  1. rexml/document attributes
  2. attributes []
  3. attributes <<
  4. attributes add
  5. attributes new

検索結果

<< < ... 2 3 4 5 6 ... > >>

REXML::Attributes#each {|name, value| ... } -> () (3006.0)

各属性の名前と値に対しブロックを呼び出します。

...root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.each do |name, value|
p [name, value]
end

# => ["foo:att", "1"]
# => ["bar:att", "2"]
# => ["att", "<"]
//}...

REXML::Attributes#each_attribute {|attribute| ... } -> () (3006.0)

各属性に対しブロックを呼び出します。

...rg/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</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://example.org/b...

REXML::Attributes#length -> Integer (3006.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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p a.attributes.length # => 3
//}...

REXML::Attributes#size -> Integer (3006.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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p a.attributes.length # => 3
//}...

REXML::Attributes#to_a -> [Attribute] (3006.0)

属性の配列を返します。

...属性の配列を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a x='1' y='2' z='3' />")
doc.root.attributes.to_a # => [x='1', y='2', z='3']
//}...

絞り込み条件を変える

REXML::StreamListener#attlistdecl(element_name, attributes, raw_content) -> () (113.0)

DTDの属性リスト宣言をパースしたときに呼び出されるコールバックです。

...言をパースしたときに呼び出されるコールバックです。

@param element_name 要素名が文字列で渡されます
@param attributes 属性名とそのデフォルト値の対応が
{ 属性名文字列 => デフォルト値文字列(無ければnil) } という
...
...渡されます

=== 例
<!ATTLIST a att CDATA #REQUIRED xyz CDATA "foobar">
という属性リスト宣言に対しては
element_name: "a"
attributes
: {"att"=>nil, "xyz"=>"foobar"}
raw_content: " \n<!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"
という引数が渡されます。...

CGI::HtmlExtension#form(attributes) -> String (108.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。

例:
form({"METHOD" => "post", ENCTYPE => "enctype"}){ "string" }
# <FORM METHOD="post" ENCTYPE="enctype">...

CGI::HtmlExtension#form(attributes) { ... } -> String (108.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。

例:
form({"METHOD" => "post", ENCTYPE => "enctype"}){ "string" }
# <FORM METHOD="post" ENCTYPE="enctype">...

CGI::HtmlExtension#html(attributes = {}) -> String (108.0)

トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...レベルの html 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。
擬似属性の "PRETTY" に文字列を与えるとその文字列でインデン...
<< < ... 2 3 4 5 6 ... > >>