192件ヒット
[1-100件を表示]
(0.154秒)
別のキーワード
種類
- インスタンスメソッド (180)
- モジュール (12)
クラス
-
REXML
:: Attribute (36) -
REXML
:: Attributes (120) -
REXML
:: DocType (12) -
REXML
:: Element (12)
キーワード
- << (12)
- Namespace (12)
- [] (12)
- []= (12)
- add (12)
- attribute (12)
-
attributes
_ of (12) -
delete
_ all (12) - each (12)
-
each
_ attribute (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) - namespace (12)
- namespaces (12)
-
to
_ string (12) - write (12)
検索結果
先頭5件
-
REXML
:: Attribute # namespace(arg = nil) -> String | nil (30102.0) -
属性の名前空間の 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_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/ns"... -
REXML
:: Attribute # to _ string -> String (21018.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
:: Attribute # write(output , indent = -1) -> object (21018.0) -
output に self の情報を name='value' という形式で書き込みます。
...output に self の情報を name='value' という形式で書き込みます。
output が返ります。
@param output 書き込み先の IO オブジェクト
@param indent インデントレベル、ここでは無視される... -
REXML
:: Attributes # namespaces -> { String => String } (9102.0) -
self の中で宣言されている名前空間の集合を返します。
...mlist[][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 doc.root.attributes.namespaces
# => {"foo"=>"htt......p://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Namespace (6008.0) -
XML 名前空間によって管理される「名前」を持つようなノードを 表すモジュール。
...XML 名前空間によって管理される「名前」を持つようなノードを
表すモジュール。
要素(REXML::Element)、属性(REXML::Attribute)
に include されます。... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (3332.0) -
namespace と name で特定される属性を返します。
...namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合......メソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:ba... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (3226.0) -
name という名前を持つ属性をすべて削除します。
...
name という名前を持つ属性をすべて削除します。
削除された属性を配列で返します。
@param name 削除する属性の名前
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http:... -
REXML
:: Attributes # [](name) -> String | nil (3137.0) -
属性名nameの属性値を返します。
...属性名nameの属性値を返します。
属性値ではなく REXML::Attribute オブジェクトが必要な場合は
REXML::Attributes#get_attribute を使ってください。
nameという属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
//emlis......t[][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.attributes["att"] # => "<"
p a.attributes["bar:at... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (3131.0) -
name という名前の属性を取得します。
...name という名前の属性を取得します。
name という名前を持つ属性がない場合は nil を返します。
@param name 属性名(文字列)
@see REXML::Attributes#[]
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example...