るりまサーチ

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

別のキーワード

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

ライブラリ

モジュール

キーワード

検索結果

rexml/parsers/streamparser (38048.0)

ストリーム式の XML パーサ。

...白や改行もテキストであることに注意してください。

//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
class Listener
include REXML::StreamListener
def initialize
@events = []
end

def text(text)...
...いては変換処理されていないことなどが
わかります。

//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"?>...
...ATA "foobar">
<!NOTATION foobar SYSTEM "http://example.org/foobar.dtd">
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"xhtml-symbol.ent">
%HTMLsymbol;
]>
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar"><![CDATA[cdata is here...

rexml (48.0)

Pure Ruby の XML パーサです。 DOM スタイルと SAX スタイルの両方をカバーしています。

...* rexml/parsers/sax2parser
* rexml/parsers/streamparser
のいずれかを用います。

また、それ以外のパーサとして
* rexml/parsers/pullparser
* rexml/parsers/ultralightparser
などもあります。

=== リンク

* REXML Home
http
://www.germane-software.com/softw...
...e/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/tutorial.html
日本語訳 http://www.baykit.org/~makotos/cgi-bi...
...n/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::StreamListener#entitydecl(content) -> () (30.0)

DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。

...uby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes'>
<!ENTITY WhatHeSaid "He said %YN;">
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">...
...<!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
]>
<root />
EOS

class Listener
include REXML::StreamListener
def entitydecl(content); p cont...
...s", "%"]
# >> ["WhatHeSaid", "He said %YN;"]
# >> ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
# >> ["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate//EN", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
# >> ["hatch-pic", "SYSTEM...