13件ヒット
[1-13件を表示]
(0.007秒)
種類
- インスタンスメソッド (7)
- 特異メソッド (4)
- 定数 (1)
- クラス (1)
クラス
-
REXML
:: Attributes (2) -
REXML
:: DocType (1) -
REXML
:: Entity (2) -
REXML
:: Parent (3) -
REXML
:: Text (3)
モジュール
検索結果
先頭5件
-
REXML
:: EntityConst :: GT -> REXML :: Entity (54358.0) -
「>」「>」というエンティティを表わすオブジェクト。
「>」「>」というエンティティを表わすオブジェクト。 -
REXML
:: Attributes # length -> Integer (18307.0) -
属性の個数を返します。
...属性の個数を返します。
//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='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p a.attribu... -
REXML
:: Parent # length -> Integer (18307.0) -
保持している子ノードの数を返します。
保持している子ノードの数を返します。 -
REXML
:: Attributes # size -> Integer (9007.0) -
属性の個数を返します。
...属性の個数を返します。
//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='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p a.attribu... -
REXML
:: Parent # size -> Integer (9007.0) -
保持している子ノードの数を返します。
保持している子ノードの数を返します。 -
REXML
:: Parent # []=(start , length , node) (307.0) -
子ノード列上の指定した場所を node で置き換えます。
子ノード列上の指定した場所を node で置き換えます。
Array#[]= と同じ指定が可能です。
@param index 変更場所の index (Integer)
@param range 変更場所の範囲 (Range)
@param start 変更範囲の最初の位置 (Integer)
@param length 変更範囲の個数 (Integer)
@param node 置き換えるノード -
REXML
:: DocType # entities -> { String => REXML :: Entity } (79.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
:: Entity . new(array) -> REXML :: Entity (43.0) -
新たな Entity オブジェクトを生成して返します。
新たな Entity オブジェクトを生成して返します。
name, value で実体の名前とその値を定義します。
parent はその entity オブジェクトが属するノードを渡します。
reference でその実体宣言がパラメータ実体(parameter entity)かどうかを指定します。
このコンストラクタでは単純な内部実体(internal entity)宣言のみを実現できます。
それ以外の内容を保持する Entity オブジェクトが欲しい場合は、
文書に適切な DTD を含めておいてそれを REXML::Document.new で
パースするようにしてください。
配列... -
REXML
:: Entity . new(name , value , parent=nil , reference=false) -> REXML :: Entity (43.0) -
新たな Entity オブジェクトを生成して返します。
新たな Entity オブジェクトを生成して返します。
name, value で実体の名前とその値を定義します。
parent はその entity オブジェクトが属するノードを渡します。
reference でその実体宣言がパラメータ実体(parameter entity)かどうかを指定します。
このコンストラクタでは単純な内部実体(internal entity)宣言のみを実現できます。
それ以外の内容を保持する Entity オブジェクトが欲しい場合は、
文書に適切な DTD を含めておいてそれを REXML::Document.new で
パースするようにしてください。
配列... -
REXML
:: DocType (25.0) -
XML の DTD(文書型定義、Document Type Definition)を表すクラスです。
XML の DTD(文書型定義、Document Type Definition)を表すクラスです。
rexml では DTD は積極的にはサポートされていません。
デフォルトの実体定義(gt, lt, amp, quot apos)の解決のため DTD は
ある程度はサポートされますが、スキーマの定義や検証をしたい場合は
XML schema や RELAX NG などを使ってください。
子ノード(REXML::Parent#children)として、
* REXML::ElementDecl
* REXML::ExternalEntity
* REXML::Entity
... -
REXML
:: Text # value=(val) (25.0) -
テキストの内容を val に変更します。
...al には非正規化された(エスケープされていない)文字列を渡さなければ
なりません。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("a")
e.add_text("foo")
e[0].value = "bar"
e.to_s # => "<a>bar</a>"
e[0].value = "<a>"
e.to_s # => "<a><a></a>"
/... -
REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) (25.0) -
テキストノードオブジェクトを生成します。
...L::Text.new("<&", false, nil, true).to_s # parse error
//}
//emlist[doctype があり、実体が宣言されている場合][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root [
<!ENTITY p "foobar publisher">
<!ENTITY % q "q... -
REXML
:: Text . unnormalize(string , doctype = nil , filter = nil , illegal = nil) -> String (25.0) -
string を非正規化(すべての entity をアンエスケープ)したものを 返します。
string を非正規化(すべての entity をアンエスケープ)したものを
返します。
filter でアンエスケープしない実体の実体名を文字列配列で指定します。
@param string 非正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@param filter アンエスケープしない実体の実体名(文字列配列)
@param illegal 内部用。使わないでください。
//emlist[][ruby]{
require 'rexml/text'
REXML::Text.unnormalize("& &foobar; ...