るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.237秒)
トップページ > クエリ:start[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 (38036.0)

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

...味がないので
たいがいの場合には無視すべきでしょう。

各ノードは以下のような配列で表現されます。

: [:start_element, 親ノード, 要素名, 属性, *子ノード]
XML要素。属性は { 属性名文字列 => 属性値文字列 } という Hash。...
...ーゲット文字列, 内容文字列 | nil]
XML処理命令(Processing Instruction, PI)
: [:comment ,コメント文字列]
コメント
: [:start_doctype, 親ノード, ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil, *子ノード]
DTD。...
...{
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"],
# >> [:start_element,...