6件ヒット
[1-6件を表示]
(0.036秒)
種類
- インスタンスメソッド (3)
- 特異メソッド (2)
- 定数 (1)
クラス
-
REXML
:: Attributes (1) -
REXML
:: DocType (2) -
REXML
:: Document (1) -
REXML
:: Element (2)
キーワード
-
DEFAULT
_ ENTITIES (1) -
add
_ element (1) - entities (1)
- namespaces (1)
- new (2)
検索結果
先頭5件
- REXML
:: Attributes # namespaces -> { String => String } - REXML
:: DocType # entities -> { String => REXML :: Entity } - REXML
:: DocType :: DEFAULT _ ENTITIES -> { String => REXML :: Entity } - REXML
:: Element # add _ element(element , attrs = nil) -> Element - REXML
:: Element . new(arg = UNDEFINED , parent = nil , context = nil) -> REXML :: Element
-
REXML
:: Attributes # namespaces -> { String => String } (631.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=... -
REXML
:: DocType # entities -> { String => REXML :: Entity } (376.0) -
DTD で宣言されている実体の集合を Hash で返します。
DTD で宣言されている実体の集合を Hash で返します。
返される Hash は実体参照名をキーとし、対応する REXML::Entity オブジェクト
を値とするハッシュテーブルです。
これには、XML のデフォルトの実体(gt, lt, quot, apos)も含まれています。
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.entities # => { "gt" => #... -
REXML
:: DocType :: DEFAULT _ ENTITIES -> { String => REXML :: Entity } (358.0) -
XML の仕様上デフォルトで定義されている実体の Hash table。
XML の仕様上デフォルトで定義されている実体の Hash table。
"amp" => REXML::EntityConst::AMP は含まれません。 -
REXML
:: Element # add _ element(element , attrs = nil) -> Element (61.0) -
子要素を追加します。
...された要素です。
@param element 追加する要素
@param attrs 追加する要素に設定する属性
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a/>')
el = doc.root.add_element 'my-tag' # => <my-tag/>
doc.root.to_s # => "<a><my-tag/></a>"
el = doc.root.add_ele... -
REXML
:: Element . new(arg = UNDEFINED , parent = nil , context = nil) -> REXML :: Element (61.0) -
要素オブジェクトを生成します。
要素オブジェクトを生成します。
arg が文字列の場合、新たな要素の名前は arg に設定されます。
arg が REXML::Element オブジェクトの場合は、
新たな要素の名前、属性、context が arg のもので初期化されます。
parent で親ノードを指定します。
context には hash table で要素のコンテキストを指定します。
基本的には text node (REXML::Text) での特別な文字、特に空白について
の取り扱いを指定できます。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
... -
REXML
:: Document . new(source = nil , context = {}) -> REXML :: Document (43.0) -
Document オブジェクトを生成します。
Document オブジェクトを生成します。
source には String、IO、REXML::Document のいずかが
指定できます。 REXML::Document を指定すると
コンテキストと要素、属性が複製されます。
文字列の場合はそれを XML と見なしてパースします。
IOの場合は、XML文書を読み出してパースします。
context で「コンテキスト」を指定します。テキストノードの空白や
特殊文字の取り扱いを Hash で指定します。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
空白を考慮して欲しい要素の名...