204件ヒット
[1-100件を表示]
(0.058秒)
別のキーワード
種類
- インスタンスメソッド (132)
- 特異メソッド (36)
- 文書 (24)
- クラス (12)
ライブラリ
-
net
/ imap (12) -
rexml
/ document (168)
クラス
-
Net
:: IMAP (12) -
REXML
:: Attribute (12) -
REXML
:: Attributes (48) -
REXML
:: Element (48) -
REXML
:: XPath (36)
モジュール
-
REXML
:: Namespace (12)
キーワード
- Attribute (12)
- Ruby用語集 (12)
- attribute (12)
- capability (12)
- each (24)
-
each
_ attribute (12) - first (12)
-
get
_ attribute _ ns (12) -
has
_ name? (12) - match (12)
- namespaces (24)
-
ruby 1
. 8 . 4 feature (12) - whitespace (12)
検索結果
先頭5件
-
REXML
:: Attribute # namespace(arg = nil) -> String | nil (21107.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
:: Element # namespace(prefix=nil) -> String (18161.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...ます。
//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
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9329.0) -
namespace と name で特定される属性を返します。
...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/bar">
<a foo:att='1' bar:att='2' att='<'/>......get_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", "att... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9206.0) -
各属性に対しブロックを呼び出します。
...。
個々の属性は REXML::Attribute オブジェクトで渡されます。
//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.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}... -
REXML
:: Attributes # namespaces -> { String => String } (9100.0) -
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.namespaces
# => {"foo"=......>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (6313.0) -
name で指定される属性を返します。
...name で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という......@param name 属性名(文字列)
@param namespace 名前空間の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
//}... -
REXML
:: Element # namespaces -> {String => String} (6112.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"}
//}... -
Net
:: IMAP # capability -> [String] (6106.0) -
CAPABILITY コマンドを送ってサーバがサポートしている 機能(capabilities)のリストを文字列の配列として返します。
...APABILITY コマンドを送ってサーバがサポートしている
機能(capabilities)のリストを文字列の配列として返します。
capability は IMAP に関連する RFC などで定義されています。
imap.capability
# => ["IMAP4REV1", "UNSELECT", "IDLE", "NAMESPACE",... -
REXML
:: Attribute (6012.0) -
要素(REXML::Element)の属性を表すクラスです。
...要素(REXML::Element)の属性を表すクラスです。
つまり、 <element attribute="value"/> という
要素における attribute=value というペアのことです。
属性にはなんらかの名前空間(namespace, REXML::Namespace)
に属することができます。...