るりまサーチ

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

別のキーワード

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

検索結果

rexml/parsers/ultralightparser (38018.0)

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

...: [:start_element, 親ノード, 要素名, 属性, *子ノード]
XML要素。属性は { 属性名文字列 => 属性値文字列 } という Hash
子ノードの配列は node[4..-1] で得られる。
: [:text, 正規化文字列]
テキストノード
: [:processing_instruction, タ...
...DTDの属性リスト宣言。属性名とデフォルト値 は { 属性名文字列 => デフォルト値文字列(なければnil) } という Hash
: [:elementdecl, 宣言文字列]
DTDの要素宣言
: [:entitydecl, *パラメータ]
DTDの実体宣言
: [:notationdecl, 記法名文字列...
...。[...]の部分は親
ノードを指しているので、pp の表示では省略されています。

//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>...