るりまサーチ

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

別のキーワード

  1. comment new
  2. rexml comment
  3. comment ==
  4. etc comment
  5. comment <=>

ライブラリ

キーワード

検索結果

REXML::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (20.0)

output に DTD を出力します。

...(comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)...

REXML::DocType#attribute_of(element, attribute) -> String | nil (14.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...(文字列)

//emlist[][ruby]{
require 'rexml/document'

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

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

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

...れます。

//emlist[][ruby]{
require 'rexml/document'

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