るりまサーチ

最速Rubyリファレンスマニュアル検索!
696件ヒット [1-100件を表示] (0.028秒)
トップページ > クエリ:document[x] > クエリ:root[x] > クエリ:Document[x]

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document node_type
  4. rexml/document clone
  5. rexml/document to_s

検索結果

<< 1 2 3 ... > >>

Psych::Nodes::Document#root -> Psych::Nodes::Node (24101.0)

ルートノードを返します。

ルートノードを返します。

REXML::Document#root -> REXML::Element | nil (24101.0)

文書のルート要素を返します。

文書のルート要素を返します。

文書がルート要素を持たない場合は nil を返します。

REXML::Document (24036.0)

XMLの完全な文書(ドキュメント)を表すクラス。

...理命令(Processing Instruction, PI)、
DTD(文書型定義、Document Type Definition)、
などを含んでいます。
ドキュメントは直下の子ノードをただ一つ持っています(rootと呼び、
REXML::Document#root でアクセスできます)。
2つ目の要素を(REXML::Elem...

Psych::Nodes::Document (24018.0)

YAML ドキュメントを表すクラスです。

...またこの子ノードは以下のいずれかである必要があります。
* Psych::Nodes::Sequence
* Psych::Nodes::Mapping
* Psych::Nodes::Scalar
この唯一の子ノードは「ルート」とも呼ばれ、Psych::Nodes::Document#root
アクセスすることができます。...

REXML::Element#root -> REXML::Element (18173.0)

self が属する文書のルート要素を返します。

...uby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS

children = doc.get_elements("/root/children").first
children.name # => "children"
children.root.name # => "root"
grandchildren = doc.get_elements("/root/children/grandchildr...
...en").first
grandchildren.name # => "grandchildren"
grandchildren.root.name # => "root"
//}...

絞り込み条件を変える

REXML::Element#root_node -> REXML::Document | REXML::Node (6387.0)

self が属する文書のルートノードを返します。

...書(REXML::Document) オブジェクトが
返されます。

その要素が属する REXML::Document オブジェクトが存在しない
場合は木構造上のルートノードが返されます。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>...
...ren />
</children>
</root>
EOS

children = doc.get_elements("/root/children").first
children.name # => "children"
children.root_node == doc # => true
grandchildren = doc.get_elements("/root/children/grandchildren").first
grandchildren.name # => "grandchildren"
grandchildren.root_node == doc # => tru...

rexml/parsers/sax2parser (102.0)

SAX2 と同等の API を持つストリーム式の XML パーサ。

...require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'

parser = REXML::Parsers::SAX2Parser.new(<<XML)
<root n="0">
<a n="1">111</a>
<b n="2">222</b>
<a n="3">333</a>
</root>
XML

elements = []
parser.listen(:start_element){|uri, localname, qname, attrs|
elements << [qname, attrs]
}...
...art_document]
# >> [:xmldecl, "1.0", "UTF-8", nil]
# >> [:progress, 39]
# >> [:characters, "\n"]
# >> [:progress, 91]
# >> [:processing_instruction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:progress, 91]
# >> [:characters, "\n"]
# >> [:progress, 144]
# >> [:doctype, "root",...
...barbarbarbar\n"]
# >> [:progress, 683]
# >> [:end_element, "http://example.org/default", "root", "root"]
# >> [:end_prefix_mapping, nil]
# >> [:end_prefix_mapping, "foo"]
# >> [:end_prefix_mapping, "bar"]
# >> [:progress, 683]
# >> [:characters, "\n"]
# >> [:progress, 683]
# >> [:end_document]
//}...

REXML::CData.new(text, respect_whitespace = true, parent = nil) -> REXML::CData (90.0)

text をテキストとして持つ CData オブジェクトを生成します。

...equire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root />
EOS
doc.root.add(REXML::CData.new("foo bar baz "))
doc.to_s # => "<root><![CDATA[foo bar baz ]]></root>\n"

doc = REXML::Document.new(<<EOS)
<root />
EOS
doc.root.add(REXML::CData.new("foo bar baz ", true))
doc.root.add(REXML::CD...
...ata.new("foo bar baz ", false))
doc.to_s # => "<root><![CDATA[foo bar baz ]]><![CDATA[foo bar baz ]]></root>\n"
//}...

REXML::Text.new(arg, respect_whitespace = false, parent = nil, raw = nil, entity_filter = nil, illegal = REXML::Text::NEEDS_A_SECOND_CHECK) (84.0)

テキストノードオブジェクトを生成します。

...ルトの場合)、
テキストがどのようにエスケープされるかは、そのノードが属する
文書(REXML::Document)の
DTD(REXML::DocType, REXML::Document#doctype)
で定義されます。DTD が与えられていない場合は、XMLの規格上
以下の実体参照/対応文字...
...e 'rexml/document'
doc = REXML::Document.new(<<EOS)
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root [
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
<root />
EOS
REXML::Text.new("&quzz", false, doc.root, false).to_s # => "&amp;&q;"
REXML::Text.new("quzz", false, doc.root, true).t...
<< 1 2 3 ... > >>