るりまサーチ

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

別のキーワード

  1. string b
  2. _builtin b
  3. b
  4. b _builtin

キーワード

検索結果

<< 1 2 3 > >>

REXML::Attribute#to_string -> String (9211.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::DocType#attribute_of(element, attribute) -> String | nil (6304.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。

elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣言されていない、...
...bute 属性名(文字列)

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

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foob...
...ar publisher">
]>
EOS

p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # => nil
//}...

REXML::DocType#public -> String | nil (6204.0)

DTD の公開識別子を返します。

...list[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype.public # =>...
..."-//W3C//DTD XHTML 1.0 Strict//EN"

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}...

REXML::Entity#pubid -> String | nil (6204.0)

公開識別子(public identifier)を用いた外部実体宣言の場合は、その公開識別子を 返します。

...公開識別子(public identifier)を用いた外部実体宣言の場合は、その公開識別子を
返します。

それ以外の場合は nil を返します。...

REXML::NotationDecl#public -> String | nil (6204.0)

公開識別子を返します。

公開識別子を返します。

宣言が公開識別子を含まない場合は nil を返します。

絞り込み条件を変える

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

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

...す。

//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 doc.root.attributes.namespaces
# => {...
..."foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...

REXML::Attribute#prefix -> String (3116.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", "y...

REXML::Attribute#namespace(arg = nil) -> String | nil (3104.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.exa...

REXML::Attribute#to_s -> String (3104.0)

正規化された属性値を返します。

正規化された属性値を返します。

属性値の正規化については XML の仕様を参考にしてください。
<< 1 2 3 > >>