るりまサーチ

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

別のキーワード

  1. psych style=
  2. psych style
  3. scalar style
  4. sequence style
  5. scalar style=

ライブラリ

クラス

モジュール

キーワード

検索結果

REXML::StreamListener#instruction(name, instruction) -> () (18227.0)

XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。

...名が文字列で渡されます
@param instruction 処理命令の内容が文字列で渡されます

=== 例
<?xml-stylesheet type="text/css" href="style.css"?>
というPIに対し
name: "xml-stylesheet"
instruction
: " type=\"text/css\" href=\"style.css\""
という引数が渡されま...

REXML::Instruction#content -> String | nil (3013.0)

XML 処理命令の内容を返します。

...<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"style.css\""
doc[4].target # => "foobar"
doc[4].content #...

REXML::Instruction#target -> String (3013.0)

XML 処理命令のターゲットを返します。

...quire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"style.css\""
//}...