るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.179秒)

別のキーワード

  1. rexml/document new
  2. rexml/document clone
  3. rexml/document to_s
  4. rexml/document node_type

ライブラリ

検索結果

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

output に DTD を出力します。

...ます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。

//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">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

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