るりまサーチ

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

別のキーワード

  1. rexml/document namespace
  2. rake namespace
  3. element add_namespace
  4. rexml/document add_namespace
  5. namespace []

モジュール

キーワード

検索結果

<< < 1 2 3 >>

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

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

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

namespace
で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...メソッドを
使うことで属性を正しく指定することができます。

@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

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

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

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

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

...きます。

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

REXML::Attributes#each {|name, value| ... } -> () (9.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://examp...

REXML::Attributes#each_attribute {|attribute| ... } -> () (9.0)

各属性に対しブロックを呼び出します。

...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.each_attribute do |attr|
p [attr.namespace, attr.n...

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

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

...のには :all が指定されている場合と、
配列に含まれている場合の両方があります。
のいずれかの場合に真を返します。

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

絞り込み条件を変える

<< < 1 2 3 >>