812件ヒット
[101-200件を表示]
(0.188秒)
別のキーワード
ライブラリ
- ビルトイン (154)
- matrix (128)
-
rexml
/ document (516) - set (14)
クラス
- Array (60)
- Matrix (64)
- Module (12)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (12) -
REXML
:: Child (24) -
REXML
:: DocType (48) -
REXML
:: Element (276) -
REXML
:: Elements (108) -
REXML
:: Text (12) - Range (4)
- Set (20)
- Vector (64)
モジュール
- Enumerable (72)
キーワード
- << (12)
- [] (24)
- []= (12)
- add (12)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ element (12) -
add
_ namespace (24) - attribute (12)
-
attribute
_ of (12) -
attributes
_ of (12) - collect! (28)
- component (12)
- delete (24)
-
delete
_ all (12) -
delete
_ attribute (12) -
delete
_ element (12) -
delete
_ namespace (12) -
drop
_ while (48) - each (12)
-
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
elements
_ to _ f (12) -
elements
_ to _ i (12) -
elements
_ to _ r (12) -
external
_ id (12) -
get
_ text (12) -
has
_ elements? (12) - inspect (12)
- map! (28)
- namespace (24)
- namespaces (12)
-
next
_ element (12) -
next
_ sibling= (12) - prefix (12)
- prefixes (12)
-
previous
_ sibling= (12) -
reverse
_ each (28) - root (12)
-
root
_ node (12) -
ruby2
_ keywords (12) - size (12)
-
take
_ while (48) - text (12)
- text= (12)
-
to
_ a (12) -
to
_ s (8) -
to
_ string (12) - transpose (12)
- value= (12)
- write (12)
- xpath (12)
検索結果
先頭5件
-
REXML
:: Element # next _ element -> Element | nil (18327.0) -
次の兄弟要素を返します。
...次の兄弟要素を返します。
次の要素が存在しない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b/>text<c/></a>'
doc.root.elements['b'].next_element # => <c/>
doc.root.elements['c'].next_element # => nil
//}... -
Vector
# elements _ to _ f -> Vector (18313.0) -
ベクトルの各成分をFloatに変換したベクトルを返します。
...ベクトルの各成分をFloatに変換したベクトルを返します。
このメソッドは deprecated です。 map(&:to_f) を使ってください。
//emlist[例][ruby]{
require 'matrix'
v = Vector.elements([2, 3, 5, 7, 9])
p v.elements_to_f
# => Vector[2.0, 3.0, 5.0, 7.0, 9.0]
//}... -
Vector
# elements _ to _ i -> Vector (18313.0) -
ベクトルの各成分をIntegerに変換したベクトルを返します。
...ベクトルの各成分をIntegerに変換したベクトルを返します。
このメソッドは deprecated です。 map(&:to_i) を使ってください。
//emlist[例][ruby]{
require 'matrix'
v = Vector.elements([2.5, 3.0, 5.01, 7])
p v.elements_to_i
# => Vector[2, 3, 5, 7]
//}... -
REXML
:: Element # has _ elements? -> bool (18213.0) -
self が一つでも子要素を持つならば true を返します。
... true を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b/><c>Text</c></a>")
doc.root.has_elements? # => true
doc.elements["/a/b"].has_elements? # => false
# /a/c はテキストノードしか持たないので false である
doc.elements......["/a/c"].has_elements? # => false
//}... -
REXML
:: Element # root -> REXML :: Element (15414.0) -
self が属する文書のルート要素を返します。
...ist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS
children = doc.get_elements("/root/children").first
children.name # => "children"
children.root.name # => "root"
grandchildren = doc.get_elements("/root/children/gran......dchildren").first
grandchildren.name # => "grandchildren"
grandchildren.root.name # => "root"
//}... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (15413.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 # add _ attributes(attrs) -> () (15325.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...attrs には 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'/>... -
REXML
:: Element # add _ attribute(attr) -> () (15313.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェ......クト)
//emlist[][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'... -
REXML
:: Element # add _ attribute(key , value) -> () (15213.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェ......クト)
//emlist[][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'...