るりまサーチ

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

別のキーワード

  1. getoptlong require_order
  2. kernel require
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. kernel require_relative

ライブラリ

クラス

キーワード

検索結果

REXML::Attribute#prefix -> String (21244.0)

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

...

//emlist[][ruby]{
require
'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new( "x",...

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

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

...る属性を返します。

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

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

XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使...
...ist[][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.attributes.get_attribute_ns("", "att") # => att='...
...&lt;'
a.attributes.get_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::Attribute#namespace(arg = nil) -> String | nil (3131.0)

属性の名前空間の 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("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/...