77件ヒット
[1-77件を表示]
(0.063秒)
種類
- ライブラリ (44)
- インスタンスメソッド (22)
- クラス (11)
ライブラリ
-
rexml
/ document (22) -
rexml
/ sax2listener (11)
クラス
-
REXML
:: NotationDecl (11)
モジュール
-
REXML
:: SAX2Listener (11)
キーワード
- NotationDecl (11)
-
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
rexml
/ parsers / ultralightparser (11)
検索結果
先頭5件
-
REXML
:: NotationDecl # public -> String | nil (21308.0) -
公開識別子を返します。
...公開識別子を返します。
宣言が公開識別子を含まない場合は nil を返します。... -
REXML
:: SAX2Listener # notationdecl(name , public _ or _ system , public _ id , system _ id) -> () (18433.0) -
DTDの記法宣言に出会ったときに呼び出されるコールバックメソッドです。
...ram public_or_system "PUBLIC" もしくは "SYSTEM" が渡されます
@param public_id 公開識別子が文字列で渡されます。指定されていない場合はnilが渡されます
@param system_id システム識別子が文字列で渡されます。指定されていない場合はnil... -
REXML
:: NotationDecl (6150.0) -
DTD の記法宣言を表すクラスです。
...NOTATION type-image-svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!NOTATION type-image-gif PUBLIC "image/gif">
<!NOTATION foobar SYSTEM "http://example.org/foobar.dtd">
]>
EOS
svg = doctype.notation("type-image-svg")
p svg.......ype-image-svg"
p svg.to_s # => "<!NOTATION type-image-svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"
p svg.public # => "-//W3C//DTD SVG 1.1//EN"
p svg.system # => "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"
gif = doctype.notation("type-image-gi......-image-gif"
p gif.to_s # => "<!NOTATION type-image-gif PUBLIC \"image/gif\">"
p gif.public # => "image/gif"
p gif.system # => nil
foobar = doctype.notation("foobar")
p foobar.name # => "foobar"
p foobar.to_s # => "<!NOTATION foobar SYSTEM \"http://example.org/foobar.dtd\">"
p foobar.public # => nil... -
rexml
/ parsers / pullparser (156.0) -
プル方式の XML パーサ。
...ターゲット文字列, 内容文字列 | nil)
XML処理命令(Processing Instruction, PI)
: comment (コメント文字列)
コメント
: start_doctype (ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil)
DTD 開始。判定は REXML::Parsers:......フォルト値文字列(なければnil) } という Hash
: elementdecl (宣言文字列)
DTDの要素宣言
: entitydecl
DTDの実体宣言
: notationdecl (記法名文字列, "PUBLIC" | "SYSTEM" | nil, 公開識別子文字列 | nil, URI文字列 | nil)
DTDの記法宣言
: cdata (テキス......ィング文字列 | nil, standalone ("yes" | "no" | nil))
XML宣言
: externalentity (エンティティ文字列)
doctype内のパラメータ実体参照。
//emlist[][ruby]{
require 'rexml/parsers/pullparser'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/cs... -
rexml
/ parsers / ultralightparser (96.0) -
パース結果を配列で作られた木構造により返すパーサ。
...属性値文字列 } という Hash。
子ノードの配列は node[4..-1] で得られる。
: [:text, 正規化文字列]
テキストノード
: [:processing_instruction, ターゲット文字列, 内容文字列 | nil]
XML処理命令(Processing Instruction, PI)
: [:comment ,コメント......字列]
コメント
: [:start_doctype, 親ノード, ルート要素名, "SYSTEM" | "PUBLIC" | nil, システム識別子 | nil, 公開識別子 | nil, *子ノード]
DTD。子ノードの配列は node[6..-1] で得られる。
: [:attlistdecl, 要素名, 属性名とデフォルト値, 宣言......値文字列(なければnil) } という Hash
: [:elementdecl, 宣言文字列]
DTDの要素宣言
: [:entitydecl, *パラメータ]
DTDの実体宣言
: [:notationdecl, 記法名文字列, "PUBLIC" | "SYSTEM" | nil, 公開識別子文字列 | nil, URI文字列 | nil]
DTDの記法宣言
: [:c... -
rexml
/ parsers / sax2parser (90.0) -
SAX2 と同等の API を持つストリーム式の XML パーサ。
...[仕様確認サンプル][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 (a+)>
<!ELEMENT a>
<!ENTITY bar "barbarbarbar"......"1.0", "UTF-8", nil]
# >> [:progress, 39]
# >> [:characters, "\n"]
# >> [:progress, 91]
# >> [:processing_instruction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:progress, 91]
# >> [:characters, "\n"]
# >> [:progress, 144]
# >> [:doctype, "root", "SYSTEM", "foo", nil]
# >> [:p......nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> [:progress, 245]
# >> [:notationdecl, "foobar", "SYSTEM", nil, "http://example.org/foobar.dtd"]
# >> [:progress, 683]
# >> [:entitydecl, "HTMLsymbol", "PUBLIC", "-//W3C//ENTITIES Symbols for XHTML//EN", "xhtml-... -
rexml
/ parsers / streamparser (78.0) -
ストリーム式の XML パーサ。
...re '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" [
<!ELEMENT root (a+)>
<!ELEMENT a>
<!ENTITY bar "barbarbarbar"......&& <!-- comment here--> &bar;
</root>
EOS
class Listener
def method_missing(name, *args)
p [name, *args]
end
def respond_to_missing?(sym, include_private)
true
end
end
REXML::Parsers::StreamParser.new(xml, Listener.new).parse
# >> [:xmldecl, "1.0", "UTF-8", nil]
# >> [:text......foo", nil]
# >> [:elementdecl, "<!ELEMENT root (a+)"]
# >> [:elementdecl, "<!ELEMENT a"]
# >> [:entitydecl, ["bar", "barbarbarbar"]]
# >> [:attlistdecl, "a", {"att"=>nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> [:notationdecl, ["foobar", "SYSTEM", nil, "h...