132件ヒット
[1-100件を表示]
(0.062秒)
クラス
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: CData (24) -
REXML
:: DocType (24) -
REXML
:: Element (24) -
REXML
:: Entity (12) -
REXML
:: Text (24)
キーワード
- [] (12)
-
add
_ element (12) -
attribute
_ of (12) - entity (12)
- namespace (12)
- text (12)
-
to
_ s (36) - value (24)
検索結果
先頭5件
-
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (229.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...ルト値が宣言されていない、のいずれかの場合は nil を返します。
@param element 要素名(文字列)
@param attribute 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<... -
REXML
:: Element # text(path = nil) -> String | nil (229.0) -
先頭のテキスト子ノードの文字列を返します。
...ドの文字列を返します。
テキストノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#get_text
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </... -
REXML
:: CData # to _ s -> String (225.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
REXML
:: CData # value -> String (225.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (223.0) -
属性の名前空間の URI を返します。
...ない場合は nil を返します。
@param arg この値を指定すると、その属性の名前空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_att... -
REXML
:: Attributes # [](name) -> String | nil (223.0) -
属性名nameの属性値を返します。
..._attribute を使ってください。
nameという属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.or... -
REXML
:: DocType # entity(name) -> String | nil (223.0) -
name という実体参照名を持つ実体を文字列で返します。
...文字列が返されます。
name という名前を持つ実体が存在しない場合には nil を返します。
@param name 実体参照名(文字列)
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.entity("bar... -
REXML
:: Entity # to _ s -> String (223.0) -
実体宣言を文字列化したものを返します。
...実体宣言を文字列化したものを返します。
@see REXML::Entity#write
//emlist[][ruby]{
e = REXML::ENTITY.new("w", "wee");
p e.to_s # => "<!ENTITY w \"wee\">"
//}... -
REXML
:: Text # to _ s -> String (223.0) -
テキストの内容を正規化(すべての実体をエスケープ)された状態で返します。
...ストとして妥当です。
結果は REXML::Text.new で指定した entity_filter を反映しています。
@see REXML::Text#value
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}...