77件ヒット
[1-77件を表示]
(0.046秒)
種類
- インスタンスメソッド (33)
- ライブラリ (22)
- クラス (11)
- 特異メソッド (11)
ライブラリ
-
rexml
/ document (44) -
rexml
/ sax2listener (11)
クラス
-
REXML
:: DocType (11) -
REXML
:: NotationDecl (22)
モジュール
-
REXML
:: SAX2Listener (11)
キーワード
- new (11)
- notation (11)
- notationdecl (11)
-
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11)
検索結果
先頭5件
-
REXML
:: NotationDecl # name -> String (21101.0) -
記法宣言の名前を返します。
記法宣言の名前を返します。 -
REXML
:: NotationDecl (18018.0) -
DTD の記法宣言を表すクラスです。
...PUBLIC "image/gif">
<!NOTATION foobar SYSTEM "http://example.org/foobar.dtd">
]>
EOS
svg = doctype.notation("type-image-svg")
p svg.name # => "type-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/svg1......dtd"
gif = doctype.notation("type-image-gif")
p gif.name # => "type-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... -
REXML
:: SAX2Listener # notationdecl(name , public _ or _ system , public _ id , system _ id) -> () (6208.0) -
DTDの記法宣言に出会ったときに呼び出されるコールバックメソッドです。
...DTDの記法宣言に出会ったときに呼び出されるコールバックメソッドです。
@param name 記法名が文字列で渡されます
@param public_or_system "PUBLIC" もしくは "SYSTEM" が渡されます
@param public_id 公開識別子が文字列で渡されます。指定... -
REXML
:: NotationDecl . new(name , middle , pub , sys) -> REXML :: NotationDecl (3224.0) -
NotationDecl オブジェクトを生成します。
...NotationDecl オブジェクトを生成します。
@param name 記法名(文字列)
@param middle 種別("PUBLIC" もしくは "SYSTEM")
@param pub 公開識別子(文字列)
@param sys URI(文字列)... -
REXML
:: DocType # notation(name) -> REXML :: NotationDecl | nil (246.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。
...DTD に含まれている記法宣言 (REXML::NotationDecl) で
name という名前を持つものを返します。
name という名前を持つ記法宣言が存在しない場合は nil を返します。
@param name 検索する記法名... -
rexml
/ parsers / streamparser (42.0) -
ストリーム式の XML パーサ。
...events << "text[#{text}]"
end
def tag_start(name, attrs)
@events << "tag_start[#{name}]"
end
attr_reader :events
end
xml = <<EOS
<members>
<member name="apple" color="red">
<comment>comment here</comment>
</member>
<member name="banana" color="yellow"/>
</members>
EOS
listen......ere]]>
<a foo:att='1' bar:att='2' att='<'/>
&& <!-- 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).par......, "barbarbarbar"]]
# >> [:attlistdecl, "a", {"att"=>nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> [:notationdecl, ["foobar", "SYSTEM", nil, "http://example.org/foobar.dtd"]]
# >> [:entitydecl, ["HTMLsymbol", "PUBLIC", "-//W3C//ENTITIES Symbols for XHTML//E... -
rexml
/ parsers / sax2parser (30.0) -
SAX2 と同等の API を持つストリーム式の XML パーサ。
..."3">333</a>
</root>
XML
elements = []
parser.listen(:start_element){|uri, localname, qname, attrs|
elements << [qname, attrs]
}
as = []
parser.listen(:start_element, ["a"]){|uri, localname, qname, attrs|
as << [qname, attrs]
}
texts = []
parser.listen(:characters, ["a"]){|c| texts << c }
parser......comment here--> &bar;
</root>
EOS
class Listener
#include REXML::SAX2Listener
def method_missing(name, *args)
p [name, *args]
end
def respond_to_missing?(name, include_private)
name != :call
end
end
parser = REXML::Parsers::SAX2Parser.new(xml)
parser.listen(Listener.new)
parser.p......> [:attlistdecl, "a", {"att"=>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 S...