るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. openssl n
  4. rsa n=
  5. pop n_mails

検索結果

REXML::Element#namespace(prefix=nil) -> String (72682.0)

self の文脈で prefix が指している名前空間の URI を返します。

...ます。

prefix で指示される名前空間の宣言が存在しない場合は nil を返します。

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

REXML::Attribute#namespace(arg = nil) -> String | nil (72628.0)

属性の名前空間の URI を返します。

...でなく、arg という名前空間
の 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...

REXML::Element#delete_namespace(namespace = "xmlns") -> self (37267.0)

名前空間を要素から削除します。

...はデフォルトの名前空間を削除します。

@param namespace 削除する名前空間の prefix

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
doc.root.delete_namespace
doc.to_s # => "<a xmlns:foo='bar'/>"
doc.root.delete_name...

REXML::Element#add_namespace(prefix, uri) -> self (36703.0)

名前空間を要素に追加します。

...合はそれが上書きされます。

@param prefix 名前空間の prefix
@param uri 名前空間の uri

//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.t...

REXML::Element#add_namespace(uri) (36703.0)

名前空間を要素に追加します。

...合はそれが上書きされます。

@param prefix 名前空間の prefix
@param uri 名前空間の uri

//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.t...

絞り込み条件を変える

REXML::Attributes#namespaces -> { String => String } (36607.0)

self の中で宣言されている名前空間の集合を返します。

...ます。

返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。

//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' at...

REXML::DocType#namespaces -> nil (36607.0)

nil を返します。

nil を返します。

REXML::Element#namespaces -> {String => String} (36607.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"}
//}...

REXML::Namespace#name=(name) (36607.0)

名前を設定します。

名前を設定します。

prefix を持つ名前も持たない名前も受け付けます。

@param name 名前(文字列)

REXML::Namespace#expanded_name -> String (36373.0)

REXML::Namespace#name= で設定された名前を返します。

...REXML::Namespace#name= で設定された名前を返します。

name= で指定した名前が prefix を含んでいれば
prefix を含む名前を返し、そうでなければ
prefix を含まない名前を返します。

@see REXML::Namespace#prefix...

絞り込み条件を変える

REXML::Namespace#has_name?(other, ns = nil) -> bool (36343.0)

self が other と ns で指定した名前を持っているならば真を返します。

...れます。
other が ":" を含んでいる(つまり prefix を含んでいる)場合は
REXML
::Namespace#fully_expanded_name と other を比較します。
どちらでもない場合は other と REXML::Namespace#name を直接
比較します。

@param other 比較する名前(文字列)
@pa...

REXML::Namespace#fully_expanded_name -> String (36307.0)

完全修飾名を返します。

完全修飾名を返します。

REXML::Namespace#local_name -> String (36307.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

REXML::Namespace#name -> String (36307.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

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

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

...ることができます。

@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' a...

絞り込み条件を変える

REXML::Namespace#prefix -> String (18325.0)

prefix (前置修飾子) を返します。

...prefix (前置修飾子) を返します。

@see REXML::Namespace#prefix=...

REXML::Namespace#prefix=(value) (18025.0)

prefix (前置修飾子) を設定します。

...prefix (前置修飾子) を設定します。

@param value prefix文字列
@see REXML::Namespace#prefix...

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

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

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

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

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

namespace で名前空間の URI を指定することで、その名前空間内で
name という...
...は nil を返します。

@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' at...

REXML::Element#whitespace -> bool (9025.0)

要素(self)内で空白が考慮されるならば真を返します。

...要素(self)内で空白が考慮されるならば真を返します。

これは、
* REXML::Element#context に :respect_whitespace も :compress_whitespace も
含まれない
* context の :respect_whitespace に self の要素名が含まれていて、
:compress_whitespace に se...
...のには :all が指定されている場合と、
配列に含まれている場合の両方があります。
のいずれかの場合に真を返します。

要素名として REXML::Namespace#expanded_name が使われるので、
名前空間の prefix は判定に影響します。...

REXML::Attributes#each {|name, value| ... } -> () (325.0)

各属性の名前と値に対しブロックを呼び出します。

...属性の名前と値に対しブロックを呼び出します。

名前には expanded_name(REXML::Namespace#exapnded_name)が
渡されます。

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

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example....

絞り込み条件を変える