44件ヒット
[1-44件を表示]
(0.092秒)
ライブラリ
-
net
/ http (22) -
rexml
/ parsers / pullparser (11) -
rexml
/ streamlistener (11)
クラス
-
Net
:: HTTPResponse (22) -
REXML
:: Parsers :: PullEvent (11)
モジュール
キーワード
- body (11)
- entitydecl (11)
- entitydecl? (11)
検索結果
先頭4件
-
Net
:: HTTPResponse # entity -> String | () | nil (15214.0) -
エンティティボディを返します。
...dapter のインスタンスを返しますが、
これは使わないでください。
entity は obsolete です。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}... -
REXML
:: Parsers :: PullEvent # entitydecl? -> bool (9201.0) -
DTDの実体宣言なら真を返します。
DTDの実体宣言なら真を返します。 -
REXML
:: StreamListener # entitydecl(content) -> () (6291.0) -
DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。
...xml/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-hat......"-//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 content; end
end
REXML::Parser......s::StreamParser.new(xml, Listener.new).parse
# >> ["YN", "\"Yes\"", "%"]
# >> ["YN", "Yes", "%"]
# >> ["WhatHeSaid", "He said %YN;"]
# >> ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
# >> ["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate... -
Net
:: HTTPResponse # body -> String | () | nil (114.0) -
エンティティボディを返します。
...dapter のインスタンスを返しますが、
これは使わないでください。
entity は obsolete です。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}...