158件ヒット
[1-100件を表示]
(0.130秒)
ライブラリ
- ビルトイン (14)
-
irb
/ output-method (11) -
minitest
/ spec (1) - mkmf (11)
- psych (11)
-
rexml
/ document (99) -
rexml
/ sax2listener (11)
クラス
-
IRB
:: OutputMethod (11) - Module (1)
-
Psych
:: Handler (11) -
REXML
:: Attribute (22) -
REXML
:: Attributes (33) -
REXML
:: Element (33) - String (14)
モジュール
- Kernel (11)
-
REXML
:: Namespace (11) -
REXML
:: SAX2Listener (11)
キーワード
-
add
_ namespace (22) - attribute (11)
-
create
_ makefile (11) -
delete
_ suffix (7) -
delete
_ suffix! (7) -
get
_ attribute _ ns (11) -
infect
_ with _ assertions (1) - namespace (11)
- namespaces (11)
- ppx (11)
- prefix= (11)
- prefixes (11)
-
start
_ document (11) -
start
_ prefix _ mapping (11)
検索結果
先頭5件
-
REXML
:: Attribute # prefix -> String (21120.0) -
属性の名前空間を返します。
...uby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new( "x", "y" )
p a.prefix... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9213.0) -
namespace と name で特定される属性を返します。
...る属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使......ことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/......et_elements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt... -
REXML
:: Attributes # prefixes -> [String] (9117.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...self の中で宣言されている prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.......org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: SAX2Listener # start _ prefix _ mapping(prefix , uri) -> () (6343.0) -
名前空間の接頭辞(prefix)が導入されたときに呼び出される コールバックメソッドです。
...名前空間の接頭辞(prefix)が導入されたときに呼び出される
コールバックメソッドです。
以下のようなXMLを処理
<a xmlns:foo="http://foo.example.org/">
<foo:b />
</a>
すると
start_prefix_mapping("foo", "http://foo.example.org/")
start_element(nil,......"a", "a")
end_prefix_mapping("foo")
の順で呼びだされます。つまり名前空間を導入した要素の start_element の前に
start_prefix_mapping が呼びだされます。
@param prefix 接頭辞の文字列が渡されます
@param uri 接頭辞に対応する URI 文字列が... -
REXML
:: Namespace # prefix=(value) (6230.0) -
prefix (前置修飾子) を設定します。
...prefix (前置修飾子) を設定します。
@param value prefix文字列
@see REXML::Namespace#prefix... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (6207.0) -
name で指定される属性を返します。
...ame で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という......前空間のURI(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attribute("att") #......=> att='<'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}... -
String
# delete _ suffix!(suffix) -> self | nil (6207.0) -
self の末尾から破壊的に suffix を削除します。
...末尾から破壊的に suffix を削除します。
@param suffix 末尾から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}......@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see String#end_with?... -
String
# delete _ suffix(suffix) -> String (6207.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
...から suffix を削除した文字列のコピーを返します。
@param suffix 末尾から削除する文字列を指定します。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("he......l") # => "hello"
//}
@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?... -
IRB
:: OutputMethod # ppx(prefix , *objs) -> object (6124.0) -
引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行 を出力します。
...引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行
を出力します。
@param prefix 各 obj の先頭に追記する文字列を指定します。
@param objs 任意のオブジェクトを指定します。... -
Psych
:: Handler # start _ document(version , tag _ directives , implicit) -> () (6107.0) -
YAML ドキュメントの始まりで呼び出されます。
...がない場合は空の配列が渡されます。
tag_directives には tag directive の配列が渡されます。
それぞれの tag は [prefix, suffix] という配列で表現されます。
implicit にはドキュメントが implicit に始まっているかどうかが
真偽値で渡......tenderlovemaking.com,2009:
--- !squee
start_document に渡される引数は以下の通りです
version # => [1, 1]
tag_directives # => tenderlovemaking.com,2009:"
implicit # => false
以下の YAML に対しては
- x
- y
start_document に渡される引数は以下......の通りです。
version # => []
tag_directives # => []
implicit # => true...