るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.276秒)
トップページ > クエリ:i[x] > クエリ:PI[x] > クエリ:rexml/parsers/ultralightparser[x]

別のキーワード

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

検索結果

rexml/parsers/ultralightparser (44012.0)

パース結果を配列で作られた木構造により返すパーサ。

...返すパーサ。

REXML::Parsers::UltraLightParser.new でパーサオブジェクトを
生成し、REXML::Parsers::UltraLightParser#parse でパースし
その結果の木構造を返します。

===[a:nodes] ノードの表現
REXML::Parsers::UltraLightParser#parse が返す
XML の各ノー...
...cessing_instruction, ターゲット文字列, 内容文字列 | nil]
XML処理命令(Processing Instruction, PI)
: [:comment ,コメント文字列]
コメント
: [:start_doctype, 親ノード, ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil, *...
...います。

//emlist[][ruby]{
require 'rexml/parsers/ultralightparser'
require 'pp'
parser = REXML::Parsers::UltraLightParser.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<a n="1">xyz</a>
<b m="2" />
</root>
XML
pp parser.parse
# >> [[:xmldecl, "1.0", "UTF-8", nil],
# >> [:text,...