396件ヒット
[1-100件を表示]
(0.098秒)
種類
- インスタンスメソッド (276)
- 特異メソッド (60)
- クラス (36)
- ライブラリ (12)
- 文書 (12)
ライブラリ
-
net
/ imap (12) - rake (48)
- rexml (12)
-
rexml
/ document (276) - win32ole (24)
クラス
-
Net
:: IMAP (12) -
REXML
:: Attribute (12) -
REXML
:: Attributes (48) -
REXML
:: DocType (12) -
REXML
:: Element (84) -
REXML
:: XPath (36) -
Rake
:: NameSpace (36) -
WIN32OLE
_ VARIANT (12)
モジュール
-
REXML
:: Namespace (72) -
Rake
:: TaskManager (12)
キーワード
- Attribute (12)
- UndefinedNamespaceException (12)
-
WIN32OLE
_ VARIANT (12) - [] (12)
-
add
_ namespace (24) - attribute (12)
- capability (12)
-
delete
_ namespace (12) - each (24)
-
each
_ attribute (12) - first (12)
-
get
_ attribute _ ns (12) -
has
_ name? (12) -
in
_ namespace (12) -
local
_ name (12) - match (12)
- name (12)
- namespaces (36)
- new (24)
- prefix (12)
- rake (12)
-
ruby 1
. 8 . 4 feature (12) - tasks (12)
- whitespace (12)
検索結果
先頭5件
-
REXML
:: Element # namespace(prefix=nil) -> String (21225.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (21207.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/... -
REXML
:: Element # delete _ namespace(namespace = "xmlns") -> self (12320.0) -
名前空間を要素から削除します。
...除します。
@param namespace 削除する名前空間の prefix
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
doc.root.delete_namespace
doc.to_s # => "<a xmlns:foo='bar'/>"
doc.root.delete_namespace 'foo'
doc.to_s # => "<a/>"
//}... -
REXML
:: UndefinedNamespaceException (12000.0) -
XMLのパース中に、定義されていない名前空間が現れた場合に発生する 例外です。
XMLのパース中に、定義されていない名前空間が現れた場合に発生する
例外です。 -
REXML
:: Attributes # namespaces -> { String => String } (9300.0) -
self の中で宣言されている名前空間の集合を返します。
...ist[][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"=>"http:......//example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # namespaces -> {String => String} (9300.0) -
self の文脈で定義されている名前空間の情報を返します。
...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9229.0) -
namespace と name で特定される属性を返します。
...namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合...... namespace 名前空間(URI, 文字列)
@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='<'/>
</root>
EOS
a = doc.get......lements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
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") #... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (9206.0) -
各属性に対しブロックを呼び出します。
...ML::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='<'/>
</root>
EOS
a = doc.get_elements("/root/a").......first
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
:: Element # add _ namespace(prefix , uri) -> self (9132.0) -
名前空間を要素に追加します。
...ォルトの namespace の uri を指定します。
既に同じ prefix が存在する場合はそれが上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo"......, "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.to_s # => "<a xmlns:foo='bar' xmlns='twiddle'/>"
a.add_namespace("foo", "baz")
a.to_s # => "<a xmlns:foo='baz' xmlns='twiddle'/>"
//}...