るりまサーチ

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

別のキーワード

  1. openssl g
  2. openssl g=
  3. dh g
  4. dsa g
  5. dh g=

検索結果

<< 1 2 3 ... > >>

REXML::Attribute#to_string -> String (6203.0)

"name='value'" という形式の文字列を返します。

..."name='value'" という形式の文字列を返します。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...

REXML::Comment#string -> String (6203.0)

コメント文字列を返します。

コメント文字列を返します。

REXML::Document#encoding -> String (6203.0)

XML 宣言に含まれている XML 文書のエンコーディングを返します。

...宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.encoding # => "UTF-8"
//}...

REXML::XMLDecl#encoding -> String | nil (6203.0)

設定されているエンコーディングの名前を文字列で返します。

設定されているエンコーディングの名前を文字列で返します。

エンコーディングが指定されていない(デフォルトの UTF-8 とみなされます)
場合は nil を返します。

REXML::Attributes#get_attribute(name) -> Attribute | nil (6103.0)

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

...ire '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_a...

絞り込み条件を変える

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

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

...'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_ns("", "att") # => att='&lt;'
a.attributes.ge...
...t_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", "attt") # => nil
//}...

REXML::Attributes#length -> Integer (6103.0)

属性の個数を返します。

...ます。


//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

p a.attributes.length # => 3
//}...

REXML::Child#next_sibling -> REXML::Node (6103.0)

次の隣接ノードを返します。

...次の隣接ノードを返します。

REXML::Node#next_sibling_node の別名です。

@see REXML::Child#next_sibling=...

REXML::Child#next_sibling=(other) (6103.0)

other を self の次の隣接ノードとします。

...ther を挿入します。

@param other 挿入するノード

//emlist[][ruby]{
require 'rexml/document'

a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d

p a.to_s # => "<a><d/><b/><c/></a>"
//}...
<< 1 2 3 ... > >>