3809件ヒット
[1-100件を表示]
(0.063秒)
ライブラリ
- rexml (44)
-
rexml
/ document (2893) -
rexml
/ parsers / pullparser (242) -
rexml
/ parsers / sax2parser (88) -
rexml
/ parsers / streamparser (22) -
rexml
/ parsers / ultralightparser (33) -
rexml
/ sax2listener (187) -
rexml
/ streamlistener (154)
クラス
-
REXML
:: AttlistDecl (77) -
REXML
:: Attribute (154) -
REXML
:: Attributes (165) -
REXML
:: CData (44) -
REXML
:: Child (77) -
REXML
:: Comment (88) -
REXML
:: Declaration (22) -
REXML
:: DocType (198) -
REXML
:: Document (220) -
REXML
:: Element (451) -
REXML
:: ElementDecl (11) -
REXML
:: Elements (154) -
REXML
:: Entity (143) -
REXML
:: ExternalEntity (33) -
REXML
:: Formatters :: Default (22) -
REXML
:: Formatters :: Pretty (33) -
REXML
:: Formatters :: Transitive (11) -
REXML
:: Instruction (66) -
REXML
:: NotationDecl (66) -
REXML
:: Parent (286) -
REXML
:: ParseException (44) -
REXML
:: Parsers :: PullEvent (165) -
REXML
:: Parsers :: PullParser (77) -
REXML
:: Parsers :: SAX2Parser (88) -
REXML
:: Parsers :: StreamParser (22) -
REXML
:: Parsers :: UltraLightParser (33) -
REXML
:: Text (110) -
REXML
:: XMLDecl (165) -
REXML
:: XPath (33)
モジュール
-
REXML
:: EntityConst (44) -
REXML
:: Namespace (66) -
REXML
:: Node (77) -
REXML
:: SAX2Listener (187) -
REXML
:: Security (33) -
REXML
:: StreamListener (154)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (44)
- <=> (22)
- == (44)
- AMP (11)
- DECLARATION (11)
-
DEFAULT
_ ENTITIES (11) -
DEFAULT
_ VERSION (11) - ExternalEntity (11)
- GT (11)
- Instruction (11)
- LT (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (3) - NotationDecl (11)
- QUOT (11)
- UNDEFINED (11)
- XMLDecl (11)
- [] (66)
- []= (11)
- add (55)
-
add
_ attribute (22) -
add
_ attributes (11) -
add
_ element (11) -
add
_ namespace (11) - attlistdecl (22)
- attlistdecl? (11)
- attribute (11)
-
attribute
_ of (11) - attributes (11)
-
attributes
_ of (11) - cdata (22)
- cdata? (11)
- cdatas (11)
- characters (11)
- children (11)
- clone (99)
- collect (11)
- comment (22)
- comment? (11)
- comments (11)
- compact (11)
- content (11)
- context (33)
- deafen (11)
-
deep
_ clone (11) - default (11)
- delete (33)
-
delete
_ all (22) -
delete
_ at (11) -
delete
_ attribute (11) -
delete
_ element (11) -
delete
_ if (22) -
delete
_ namespace (11) - doctype (44)
- doctype? (11)
-
doctype
_ end (11) - document (22)
- dowrite (11)
- each (77)
-
each
_ attribute (11) -
each
_ child (22) -
each
_ element (11) -
each
_ element _ with _ attribute (11) -
each
_ element _ with _ text (11) -
each
_ index (22) -
each
_ recursive (11) - element (11)
-
element
_ name (11) - elementdecl (22)
- elementdecl? (11)
- elements (11)
- empty? (33)
- encoding (22)
- encoding= (11)
-
end
_ document (11) -
end
_ element (11) -
end
_ element? (11) -
end
_ prefix _ mapping (11) - entities (11)
- entity (22)
-
entity
_ expansion _ limit (22) -
entity
_ expansion _ text _ limit (22) -
entity
_ expansion _ text _ limit= (22) - entitydecl (22)
- entitydecl? (11)
-
event
_ type (11) - external (11)
-
external
_ id (11) -
find
_ first _ recursive (11) - first (11)
-
get
_ attribute (11) -
get
_ attribute _ ns (11) -
get
_ elements (11) -
get
_ text (11) -
has
_ attributes? (11) -
has
_ elements? (11) -
has
_ name? (11) -
has
_ next? (11) -
has
_ text? (11) - include? (11)
- index (22)
-
index
_ in _ parent (11) - inject (11)
-
insert
_ after (11) -
insert
_ before (11) - instruction (11)
- instruction? (11)
- instructions (11)
- length (22)
- line (11)
- listen (55)
-
local
_ name (11) - match (11)
- matches? (11)
- name (55)
- namespace (22)
- namespaces (33)
- ndata (11)
- new (286)
-
next
_ element (11) -
next
_ sibling (11) -
next
_ sibling _ node (11) -
node
_ type (99) - normalize (11)
- normalized (11)
- notation (11)
- notationdecl (22)
- notationdecl? (11)
- notations (11)
- nowrite (11)
- parent (11)
- parent? (22)
- parse (33)
-
parse
_ stream (11) - peek (11)
- position (11)
- prefix (22)
- prefixes (22)
-
previous
_ element (11) -
previous
_ sibling (11) -
previous
_ sibling _ node (11) -
processing
_ instruction (11) - progress (11)
- pubid (11)
- public (22)
- pull (11)
- push (11)
- raw (22)
- ref (11)
- remove (22)
-
replace
_ child (11) -
replace
_ with (11) - rewind (11)
-
rexml
/ document (11) -
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
rexml
/ parsers / ultralightparser (11) - root (22)
-
root
_ node (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) - size (33)
-
stand
_ alone? (22) - standalone (11)
-
start
_ document (11) -
start
_ element (11) -
start
_ element? (11) -
start
_ prefix _ mapping (11) - string (11)
- system (22)
-
tag
_ end (11) -
tag
_ start (11) - target (11)
- text (22)
- text? (11)
- texts (11)
-
to
_ a (33) -
to
_ s (110) -
to
_ string (11) - unnormalize (11)
- unnormalized (11)
- unshift (22)
- value (44)
- version (22)
- whitespace (11)
- width (11)
- write (121)
- writeencoding (11)
- writethis (11)
-
xml
_ decl (11) - xmldecl (33)
- xmldecl? (11)
- xmlrpc (3)
- xpath (22)
検索結果
先頭5件
-
rexml (38114.0)
-
Pure Ruby の XML パーサです。 DOM スタイルと SAX スタイルの両方をカバーしています。
...API を使うためには rexml/document を使います。
SAX スタイルの API には、
* rexml/parsers/sax2parser
* rexml/parsers/streamparser
のいずれかを用います。
また、それ以外のパーサとして
* rexml/parsers/pullparser
* rexml/parsers/ultralightparser......ク
* REXML Home
http://www.germane-software.com/software/rexml
* API リファレンス
http://www.germane-software.com/software/rexml_doc
日本語訳 http://pub.cozmixng.org/~kou/rexml-doc-ja/
* チュートリアル
http://www.germane-software.com/software/rexml/docs/tutor......ial.html
日本語訳 http://www.baykit.org/~makotos/cgi-bin/wiliki.cgi?REXML%A5%C1%A5%E5%A1%BC%A5%C8%A5%EA%A5%A2%A5%EB&l=jp
* 日本語
http://www.cozmixng.org/~kou/ruby/rexml/
http://www.cozmixng.org/~kou/ruby/rexml/reference... -
REXML
:: ParseException # context -> [Integer , Integer , Integer] (11112.0) -
パースエラーが起きた(XML上の)場所を返します。
...の)場所を返します。
要素3個の配列で、
[position, lineno, line]
という形で返します。
position, line は
REXML::ParseException#position
REXML::ParseException#line
と同じ値です。
lineno は IO#lineno が返す意味での行数です。
通常は line と同じ値... -
REXML
:: ParseException # line -> Integer (11100.0) -
パースエラーが起きた(XML上の)場所を行数で返します。
パースエラーが起きた(XML上の)場所を行数で返します。 -
REXML
:: ParseException # position -> Integer (11100.0) -
パースエラーが起きた(XML上の)場所を先頭からのバイト数で返します。
パースエラーが起きた(XML上の)場所を先頭からのバイト数で返します。 -
REXML
:: ParseException # to _ s -> String (11100.0) -
例外情報を文字列化して返します。
例外情報を文字列化して返します。 -
rexml
/ parsers / streamparser (6126.0) -
ストリーム式の XML パーサ。
...ストリーム式の XML パーサ。
rexml の XML パーサの中では高速ですが、機能は限定的です。
もう少し高機能なストリーム式パーサが必要な場合は
REXML::Parsers::SAX2Parser を用いてください。
パーサからはコールバックによって......た情報を受け取ります。
REXML::StreamListener を include し、
必要なメソッドをオーバーライドしたクラスのオブジェクトを
コールバックオブジェクトとして REXML::Parsers::StreamParser.new
に渡します。
REXML::Parsers::StreamParser#parse を呼......いないことなどが
わかります。
//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [... -
rexml
/ parsers / sax2parser (6108.0) -
SAX2 と同等の API を持つストリーム式の XML パーサ。
...ブジェクトに REXML::Parsers::SAX2Parser#listen で
設定してから REXML::Parsers::SAX2Parser#parse を呼び出すことで、
パーサからコールバックが呼び出されます。
コールバックには2種類あって、ブロックを使う方式と REXML::SAX2Listener
を inc......式があります。詳しくは
REXML::Parsers::SAX2Parser#listen を参照してください。
REXML::Parsers::StreamParser のパーサよりは高機能です。
//emlist[][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'
parser = REXML::Parsers::SAX2Parser.new(<<XML)......n"=>"3"}]]
texts # => ["111", "333"]
//}
//emlist[仕様確認サンプル][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [
<!ELEMENT root... -
rexml
/ parsers / pullparser (6096.0) -
プル方式の XML パーサ。
...プル方式の XML パーサ。
REXML::Parsers::StreamParser はパースした結果をコールバックによって
受動的に受け取りますが、このパーサは REXML::Parsers::PullParser#pull
によってパーサから結果をイベントという形で順に能動的に取り出......ら取り除きます。
pull は REXML::Parsers::PullEvent オブジェクトを返します。
このオブジェクトの
REXML::Parsers::PullEvent#event_type で「開始タグ」「終了タグ」
といったイベントの種類を取得します。
REXML::Parsers::PullEvent#[] でそのイ......ity (エンティティ文字列)
doctype内のパラメータ実体参照。
//emlist[][ruby]{
require 'rexml/parsers/pullparser'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [
<!ELEMENT root (a+)>
<!ELEME... -
rexml
/ document (6066.0) -
DOM スタイルの XML パーサ。
...サ。
REXML::Document.new で XML 文書から DOM ツリーを
構築し、ツリーのノードの各メソッドで文書の内容にアクセスします。
以下のプログラムではブックマークの XML からデータを取り出します。
//emlist[][ruby]{
require 'rexml/docume...... REXML::Document.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<xbel version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>オブジェクト指向スクリプト言語 Ruby</title>
<desc>Rubyの公式サイト</desc>
</bookmark>
<bookmark href="http://rurema.clear-....../rurema/bitclust">
<title>rurema/bitclust · GitHub</title>
</bookmark>
<bookmark href="https://rubygems.org/gems/bitclust-core" />
</xbel>
XML
bookmarks = REXML::XPath.match(doc, "/xbel/bookmark").map do |bookmark|
href = bookmark.attribute("href").value
title_element = bookmark.eleme... -
rexml
/ parsers / ultralightparser (6048.0) -
パース結果を配列で作られた木構造により返すパーサ。
...た木構造により返すパーサ。
REXML::Parsers::UltraLightParser.new でパーサオブジェクトを
生成し、REXML::Parsers::UltraLightParser#parse でパースし
その結果の木構造を返します。
===[a:nodes] ノードの表現
REXML::Parsers::UltraLightParser#parse が返......されます。XML 要素のように子ノードを持つ場合、
それらの子ノードもこの配列の要素として保持されます。
REXML::Parsers::UltraLightParser#parse の返り値となる
木のルートは特別で、ノードの種類を表すシンボルを持ちません。......名, 属性, *子ノード]
XML要素。属性は { 属性名文字列 => 属性値文字列 } という Hash。
子ノードの配列は node[4..-1] で得られる。
: [:text, 正規化文字列]
テキストノード
: [:processing_instruction, ターゲット文字列, 内容文字列 | n...