るりまサーチ

最速Rubyリファレンスマニュアル検索!
1140件ヒット [1-100件を表示] (0.021秒)
トップページ > クエリ:ruby[x] > ライブラリ:rexml[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

モジュール

検索結果

<< 1 2 3 ... > >>

REXML::XMLDecl (19.0)

XML 宣言を表すクラス。

...XML 宣言を表すクラス。

文書から XML 宣言を取り出すには REXML::Document#xml_decl を使います。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<e />
EOS

xml_decl = doc.xml_decl
xml_decl....
...][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<e />
EOS

xml_decl = doc.xml_decl
xml_decl.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.standalone # => nil
xml_decl.writethis # => false
//}

//emlist[XML 宣言が encoding 属性を持たない場合の例][ruby]{
r...
...equire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" ?>
<e />
EOS

xml_decl = doc.xml_decl
xml_decl.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.standalone # => nil
xml_decl.writethis # => true
//}...

REXML::Document.entity_expansion_text_limit -> Integer (13.0)

実体参照の展開による文字列の増分(テキストのバイト数)の 最大値を指定します。

...トは 10240 (byte) です。

このメソッドは Ruby 2.1 から deprecated になりました。
REXML
::Security.entity_expansion_text_limit を使ってください。

@see REXML::Document.entity_expansion_text_limit=,
http://www.ruby-lang.org/ja/news/2013/02/22/rexml-dos-2013-02-22/...

REXML::Document.entity_expansion_text_limit=(val) (13.0)

実体参照の展開による文字列の増分(テキストのバイト数)の 最大値を指定します。

...トは 10240 (byte) です。

このメソッドは Ruby 2.1 から deprecated になりました。
REXML
::Security.entity_expansion_text_limit= を使ってください。

@see REXML::Document.entity_expansion_text_limit
http://www.ruby-lang.org/ja/news/2013/02/22/rexml-dos-2013-02-22/...

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

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

...ジェクトを生成します。

arg でノードの内容を指定します。
文字列の場合はそれが内容として使われます。
REXML
::Text オブジェクトの場合はその内容が複製されます。

respect_whitespace に真を指定すると、arg に含まれる空白文...
...あると解釈され、
rexml
はテキストに含まれているすべての(定義済み)実体を
エスケープします
nilの場合、親ノードが raw モードであるかどうかで
self が raw モードになるかどうかが決まります。
arg に REXML::Text オブジェクト...
...(デフォルトの場合)、
テキストがどのようにエスケープされるかは、そのノードが属する
文書(REXML::Document)の
DTD(REXML::DocType, REXML::Document#doctype)
で定義されます。DTD が与えられていない場合は、XMLの規格上
以下の実体参照/...

REXML::ParseException (8.0)

XML のパースに失敗したときに生じる例外です。

...XML のパースに失敗したときに生じる例外です。

//emlist[][ruby]{
require 'rexml/document'
begin
REXML
::Document.new("<a>foo\n</b></a> ")
rescue REXML::ParseException => ex
ex.position # => 16
ex.line # => 2
ex.context # => [16, 2, 2]
end
//}...

絞り込み条件を変える

REXML::Attribute#namespace(arg = nil) -> String | nil (7.0)

属性の名前空間の URI を返します。

...空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_att...

REXML::Attribute#prefix -> String (7.0)

属性の名前空間を返します。

...す。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new( "...

REXML::Attribute#to_string -> String (7.0)

"name='value'" という形式の文字列を返します。

..."name='value'" という形式の文字列を返します。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...

REXML::Attributes#[](name) -> String | nil (7.0)

属性名nameの属性値を返します。

...はなく REXML::Attribute オブジェクトが必要な場合は
REXML
::Attributes#get_attribute を使ってください。

nameという属性名の属性がない場合は nil を返します。

@param name 属性名(文字列)

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

doc = REXML::Documen...
<< 1 2 3 ... > >>