るりまサーチ

最速Rubyリファレンスマニュアル検索!
377件ヒット [1-100件を表示] (0.035秒)

別のキーワード

  1. attribute value
  2. element add_attribute
  3. rexml/document attribute
  4. rexml/document add_attribute

検索結果

<< 1 2 3 ... > >>

REXML::Attribute.new(attribute, value, parent = nil) -> REXML::Attribute (21336.0)

新たな属性オブジェクトを生成します。

...新たな属性オブジェクトを生成します。

2種類の初期化が可能です。
REXML::Attribute オブジェクトを渡した場合は、
属性名とその値がそれから複製されます。
parent で新たに作られる属性オブジェクトが属する
要素が指定で...
...ます。

通常はこのメソッドは直接は使わず、REXML::Element#add_attribute などを
使うでしょう。

@param attribute_to_clone 複製元の REXML::Attribute オブジェクト
@param attribute 属性名
@param value 属性の値
@param parent 生成される属性が所属す...

REXML::Attribute.new(attribute_to_clone, parent = nil) -> REXML::Attribute (21336.0)

新たな属性オブジェクトを生成します。

...新たな属性オブジェクトを生成します。

2種類の初期化が可能です。
REXML::Attribute オブジェクトを渡した場合は、
属性名とその値がそれから複製されます。
parent で新たに作られる属性オブジェクトが属する
要素が指定で...
...ます。

通常はこのメソッドは直接は使わず、REXML::Element#add_attribute などを
使うでしょう。

@param attribute_to_clone 複製元の REXML::Attribute オブジェクト
@param attribute 属性名
@param value 属性の値
@param parent 生成される属性が所属す...

OpenSSL::X509::Attribute.new(der) -> OpenSSL::X509::Attribute (21250.0)

attribute オブジェクトを生成します。

...attribute オブジェクトを生成します。

引数が1個で、文字列であるならば、それを DER 形式の
データであると見なして attribute オブジェクトを生成します。
引数が1個で、それ以外の場合は to_der メソッドで DER 形式に変換して...
...から
それを attribute オブジェクトに変換します。

引数が2個の場合は、それぞれを attribute の Object ID (識別子)と
値(内容)と見なして attribute オブジェクトを生成します。
この場合、oid は Object ID の文字列、value には
OpenSSL::AS...
...ブジェクト
@param oid Object ID 文字列
@param value 値を表す OpenSSL::ASN1::ASN1Data インスタンス
@raise OpenSSL::X509::AttributeError attributeオブジェクトの生成に失敗した場合に
発生します。DER 形式文字列が不正であった場合、oid, value...

OpenSSL::X509::Attribute.new(oid, value) -> OpenSSL::X509::Attribute (21250.0)

attribute オブジェクトを生成します。

...attribute オブジェクトを生成します。

引数が1個で、文字列であるならば、それを DER 形式の
データであると見なして attribute オブジェクトを生成します。
引数が1個で、それ以外の場合は to_der メソッドで DER 形式に変換して...
...から
それを attribute オブジェクトに変換します。

引数が2個の場合は、それぞれを attribute の Object ID (識別子)と
値(内容)と見なして attribute オブジェクトを生成します。
この場合、oid は Object ID の文字列、value には
OpenSSL::AS...
...ブジェクト
@param oid Object ID 文字列
@param value 値を表す OpenSSL::ASN1::ASN1Data インスタンス
@raise OpenSSL::X509::AttributeError attributeオブジェクトの生成に失敗した場合に
発生します。DER 形式文字列が不正であった場合、oid, value...

REXML::Attributes.new(element) -> REXML::Attributes (21207.0)

空の Attributes オブジェクトを生成します。

...空の Attributes オブジェクトを生成します。

どの要素の属性であるかを element で指定します。

通常は REXML::Element.new によって Attributes オブジェクト
が生成されるため、このメソッドを使う必要はありません。

@param element 属...

絞り込み条件を変える

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (18238.0)

name で指定される属性を返します。

...name で指定される属性を返します。

属性は REXML::Attribute オブジェクトの形で返します。

name は "foo:bar" のように prefix を指定することができます。

namespace で名前空間の URI を指定することで、その名前空間内で
name という...
...nt.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attribute("att") # => att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("...
...bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}...

RDoc::Markup.new(attribute_manager = nil) -> RDoc::Markup (18208.0)

自身を初期化します。

...自身を初期化します。

@param attribute_manager Rdoc::AttributeManager オブジェクトを指
定します。...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (9232.0)

namespace と name で特定される属性を返します。

...EXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://ex...
...ample.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") # => nil
//}...

REXML::Attributes#each_attribute {|attribute| ... } -> () (9220.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 fo...
...o:att='1' bar:att='2' att='&lt;'/>
</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#get_attribute(name) -> Attribute | nil (9220.0)

name という名前の属性を取得します。

...::Attributes#[]

//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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.get_attribute("...
...att") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>