11件ヒット
[1-11件を表示]
(0.410秒)
別のキーワード
検索結果
-
rexml
/ parsers / ultralightparser (56036.0) -
パース結果を配列で作られた木構造により返すパーサ。
...返すパーサ。
REXML::Parsers::UltraLightParser.new でパーサオブジェクトを
生成し、REXML::Parsers::UltraLightParser#parse でパースし
その結果の木構造を返します。
===[a:nodes] ノードの表現
REXML::Parsers::UltraLightParser#parse が返す
XML の各ノー......sing Instruction, PI)
: [:comment ,コメント文字列]
コメント
: [:start_doctype, 親ノード, ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil, *子ノード]
DTD。子ノードの配列は node[6..-1] で得られる。
: [:attlistdecl,......list[][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, "\n"],
# >> [:sta...