るりまサーチ

最速Rubyリファレンスマニュアル検索!
1284件ヒット [401-500件を表示] (0.054秒)
トップページ > クエリ:REXML::Document[x]

別のキーワード

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

ライブラリ

モジュール

検索結果

<< < ... 3 4 5 6 7 ... > >>

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

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

...子による外部サブセットを含んでいない場合は nil を返します。

//emlist[][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...

REXML::DocType#system -> String | nil (12.0)

DTD のシステム識別子を返します。

...

DTD が外部サブセットを含んでいない場合は nil を返します。

//emlist[][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...

REXML::DocType.new(source, parent = nil) -> REXML::DocType (12.0)

DocType オブジェクトを生成します。

...スもありますが、内部用なので使わないで
ください。

一般的にいって、XML 文書に含まれる DTD は REXML::Document.new などで
適切に解析され、REXML::Document#doctype で取得できます。
このメソッドを直接使う必要はありません。...

REXML::Element#xpath -> String (12.0)

文書上の対象の要素にのみマッチする xpath 文字列を返します。

...列を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/><c/></a>')
c = doc.root.elements[2] # <a> .. </a> の中の <c/> 要素
c # => <c/>
c.xpath # => "/a/c"
doc = REXML::Document.new('<a><b/><b/></a>')
b = doc.root.elements[2] # <a> .. </a> の中の2...

REXML::Elements#[](index, name = nil) -> REXML::Element | nil (12.0)

index が指し示している要素を返します。

...emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b/><c id="1"/><c id="2"/><d/></a>'
doc.root.elements[1] # => <b/>
doc.root.elements['c'] # => <c id='1'/>
doc.root.elements[2,'c'] # => <c id='2'/>

doc = REXML::Document.new '<a><b><c /><a id="1"/></b></a>'
doc.root...

絞り込み条件を変える

REXML::Security.entity_expansion_limit -> Integer (12.0)

実体参照の展開回数の上限を返します。

...

XML 文書(REXML::Document)ごとの展開回数がこの値を越えると
例外を発生させ、処理を中断します。

実体参照の展開処理を使った DoS 攻撃に対抗するための
仕組みです。

デフォルトは 10000 です。

@see REXML::Document.entity_expansi...

REXML::Security.entity_expansion_limit=(val) (12.0)

実体参照の展開回数の上限を指定します。

...の展開回数の上限を指定します。

XML 文書(REXML::Document)ごとの展開回数がこの値を越えると
例外を発生させ、処理を中断します。

デフォルトは 10000 です。

@param val 設定する上限値(整数)
@see REXML::Document.entity_expansion_limit...

REXML::Text#doctype -> REXML::DocType | nil (12.0)

テキストノードが属する文書の DTD を返します。

...テキストノードが属する文書の DTD を返します。

そのような文書(REXML::Document)が存在しない、すなわち
テキストノードの親ノードを辿っても REXML::Document に到達しない、
場合には nil を返します。

@see REXML::DocType...

rexml/document (12.0)

DOM スタイルの XML パーサ。

...DOM スタイルの XML パーサ。

REXML::Document
.new で XML 文書から DOM ツリーを
構築し、ツリーのノードの各メソッドで文書の内容にアクセスします。

以下のプログラムではブックマークの XML からデータを取り出します。

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

Bookmark = Struct.new(:href, :title, :desc)

doc = REXML::Document.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<xbel version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>オブジェクト指向スクリプト言語 Ruby</t...
<< < ... 3 4 5 6 7 ... > >>