るりまサーチ

最速Rubyリファレンスマニュアル検索!
1826件ヒット [1-100件を表示] (0.146秒)
トップページ > クエリ:i[x] > クエリ:-[x] > 種類:インスタンスメソッド[x] > クエリ:t[x] > ライブラリ:rexml/document[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

REXML::Node#index_in_parent -> Insteger (18509.0)

self の親における index を返します。

...self の親における index を返します。

返される index は 1-origin です。

ノードが親を持たない(REXML::Child でない)場合は例外を発生させます。...

REXML::Attributes#each_attribute {|attribute| ... } -> () (18503.0)

各属性に対しブロックを呼び出します。

...Attribute オブジェクトで渡されます。

//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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").fir...
...st

a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}...

REXML::Attributes#get_attribute(name) -> Attribute | nil (18403.0)

name という名前の属性を取得します。

...nil を返します。

@param name 属性名(文字列)
@see REXML::Attributes#[]

//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='&lt;'/>
</root>
EOS...
...a = doc.get_elements("/root/a").first

a.attributes.get_attribute("att") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (18403.0)

namespace と name で特定される属性を返します。

...る属性を返します。

namespace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使...
...I, 文字列)
@param name 属性名(文字列)

//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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first...
...a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::ExternalEntity#write(output, indent) -> () (18303.0)

output へ self を文字列化して出力します。

...output へ self を文字列化して出力します。

このメソッドは deprecated です。REXML::Formatter で
出力してください。

@param output 出力先の IO オブジェクト
@param indent インデントの大きさ。無視されます。...

絞り込み条件を変える

REXML::DocType#entities -> { String => REXML::Entity } (15603.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: ...>,
# "lt" => #<REXML::Entity: ...>, ... }
p doctype.entities["bar"].to_s # => "<!ENTITY bar \"barb...
...arbarbar\">"
p doctype.entities["gt"].to_s # => "<!ENTITY gt \">\">"
//}...

REXML::Element#delete_attribute(key) -> REXML::Attribute | nil (15603.0)

要素から key という属性名の属性を削除します。

...は削除されずに、nil を返します。

@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E...
...x='foo' y:x='bar'/>
e.delete_attribute("x"); e # => <E y:x='bar'/>
//}...

REXML::Entity#write(out, indent = -1) -> () (15304.0)

実体宣言を文字列化したものを out に書き込みます。

...実体宣言を文字列化したものを out に書き込みます。

@param out 出力先の IO オブジェクト
@param indent 利用されません。deprecated なパラメータです
@see REXML::Entity#to_s...

REXML::DocType#entity(name) -> String | nil (15303.0)

name という実体参照名を持つ実体を文字列で返します。

...EXML::Entity#unnormalized 参照)
された文字列が返されます。

name という名前を持つ実体が存在しない場合には nil を返します。

@param name 実体参照名(文字列)

//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "...
...barbarbarbar">
]>
EOS
p doctype.entity("bar") # => "barbarbar"
p doctype.entity("foo") # => nil
//}...

REXML::Formatters::Pretty#width -> Integer (15303.0)

出力のページ幅を返します。

...出力のページ幅を返します。

デフォルトは80です。

@see REXML::Formatters::Pretty#width=...

絞り込み条件を変える

<< 1 2 3 ... > >>