173件ヒット
[1-100件を表示]
(0.047秒)
別のキーワード
種類
- インスタンスメソッド (99)
- 特異メソッド (44)
- ライブラリ (22)
- 文書 (8)
ライブラリ
- openssl (22)
-
rexml
/ document (121)
クラス
-
OpenSSL
:: X509 :: Attribute (22) -
REXML
:: Attribute (33) -
REXML
:: Attributes (33) -
REXML
:: DocType (11) -
REXML
:: Element (44)
キーワード
-
NEWS for Ruby 2
. 4 . 0 (8) - []= (11)
-
add
_ attribute (22) -
add
_ attributes (11) -
attributes
_ of (11) - each (11)
-
each
_ attribute (11) -
each
_ element _ with _ attribute (11) -
net
/ http (11) -
rexml
/ document (11) -
to
_ string (11)
検索結果
先頭5件
- REXML
:: Attribute . new(attribute , value , parent = nil) -> REXML :: Attribute - OpenSSL
:: X509 :: Attribute . new(oid , value) -> OpenSSL :: X509 :: Attribute - REXML
:: Attribute . new(attribute _ to _ clone , parent = nil) -> REXML :: Attribute - OpenSSL
:: X509 :: Attribute . new(der) -> OpenSSL :: X509 :: Attribute - REXML
:: Attributes # each _ attribute {|attribute| . . . } -> ()
-
REXML
:: Attribute . new(attribute , value , parent = nil) -> REXML :: Attribute (21443.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(oid , value) -> OpenSSL :: X509 :: Attribute (21369.0) -
attribute オブジェクトを生成します。
...attribute オブジェクトを生成します。
引数が1個で、文字列であるならば、それを DER 形式の
データであると見なして attribute オブジェクトを生成します。
引数が1個で、それ以外の場合は to_der メソッドで DER 形式に変換して......から
それを attribute オブジェクトに変換します。
引数が2個の場合は、それぞれを attribute の Object ID (識別子)と
値(内容)と見なして attribute オブジェクトを生成します。
この場合、oid は Object ID の文字列、value には
OpenSSL::AS......d Object ID 文字列
@param value 値を表す OpenSSL::ASN1::ASN1Data インスタンス
@raise OpenSSL::X509::AttributeError attributeオブジェクトの生成に失敗した場合に
発生します。DER 形式文字列が不正であった場合、oid, value が不正であった... -
REXML
:: Attribute . new(attribute _ to _ clone , parent = nil) -> REXML :: Attribute (21343.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 (21269.0) -
attribute オブジェクトを生成します。
...attribute オブジェクトを生成します。
引数が1個で、文字列であるならば、それを DER 形式の
データであると見なして attribute オブジェクトを生成します。
引数が1個で、それ以外の場合は to_der メソッドで DER 形式に変換して......から
それを attribute オブジェクトに変換します。
引数が2個の場合は、それぞれを attribute の Object ID (識別子)と
値(内容)と見なして attribute オブジェクトを生成します。
この場合、oid は Object ID の文字列、value には
OpenSSL::AS......d Object ID 文字列
@param value 値を表す OpenSSL::ASN1::ASN1Data インスタンス
@raise OpenSSL::X509::AttributeError attributeオブジェクトの生成に失敗した場合に
発生します。DER 形式文字列が不正であった場合、oid, value が不正であった... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9226.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='<'/>
</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
:: Element # add _ attribute(key , value) -> () (6257.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェク......list[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (6253.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...ト値を REXML::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!......CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attributes_of("book")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attributes_of("book")[0].value # => ""
//}... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (6250.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...を呼び出します。
key で指定した属性名の属性を持つ要素のみを対象とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max......)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.each_element_with_attribute('id'){|e|......d='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute('id', '1', 0, 'd'){|e| p e }
# >> <d id='1'/>
//}... -
REXML
:: Element # add _ attribute(attr) -> () (6157.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェク......list[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: Element # add _ attributes(attrs) -> () (6136.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "value1"], ["name2", "value2"], ... }
という形で追加/更新する属性を指定します。
@param attrs 追加......属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}...