るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.104秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:p[x] > クエリ:attributes[x] > クラス:REXML::DocType[x]

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. matrix p
  5. kernel p

ライブラリ

検索結果

REXML::DocType#attributes_of(element) -> [REXML::Attribute] (9139.0)

DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。

.../document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
p
ublisher CDATA "foobar publisher">
]>
EOS

p
doctype.attributes_of("book")
# =>...
...[author='', title='', publisher='foobar publisher']
p
doctype.attributes_of("book")[0].name # => "author"
p
doctype.attributes_of("book")[0].value # => ""
//}...