190件ヒット
[101-190件を表示]
(0.124秒)
ライブラリ
- ビルトイン (46)
-
rexml
/ document (132) -
rubygems
/ package / tar _ header (12)
クラス
-
Gem
:: Package :: TarHeader (12) -
REXML
:: Attribute (24) -
REXML
:: Attributes (24) -
REXML
:: Element (36) - String (40)
- Symbol (6)
モジュール
-
REXML
:: Namespace (48)
キーワード
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
local
_ name (12) - name (12)
- namespace (24)
- namespaces (24)
- prefixes (24)
-
start
_ with? (14)
検索結果
先頭5件
-
Symbol
# start _ with?(*prefixes) -> bool (6207.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...の先頭が prefixes のいずれかであるとき true を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell")......#=> true
:hello.start_with?(/H/i) #=> true
# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}... -
REXML
:: Attributes # namespaces -> { String => String } (3409.0) -
self の中で宣言されている名前空間の集合を返します。
... prefix をキーとし、URI を値とする
Hash を返します。
//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_ele......ments("/root/a").first
p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # namespaces -> {String => String} (3409.0) -
self の文脈で定義されている名前空間の情報を返します。
...で定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}... -
REXML
:: Element # namespace(prefix=nil) -> String (3331.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...で prefix が指している名前空間の URI を返します。
prefix を省略すると、デフォルトの名前空間の URI を返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doc......= REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (3208.0) -
属性の名前空間の URI を返します。
...します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/... -
REXML
:: Namespace # expanded _ name -> String (226.0) -
REXML::Namespace#name= で設定された名前を返します。
...REXML::Namespace#name= で設定された名前を返します。
name= で指定した名前が prefix を含んでいれば
prefix を含む名前を返し、そうでなければ
prefix を含まない名前を返します。
@see REXML::Namespace#prefix... -
REXML
:: Namespace # local _ name -> String (219.0) -
prefix を含まない「ローカルな」名前を返します。
...prefix を含まない「ローカルな」名前を返します。... -
REXML
:: Namespace # name -> String (219.0) -
prefix を含まない「ローカルな」名前を返します。
...prefix を含まない「ローカルな」名前を返します。...