168件ヒット
[1-100件を表示]
(0.034秒)
別のキーワード
クラス
-
REXML
:: Attributes (36) -
REXML
:: Child (24) -
REXML
:: Element (108)
キーワード
-
add
_ namespace (24) - delete (12)
-
delete
_ namespace (12) -
has
_ elements? (12) - namespace (12)
- namespaces (24)
-
next
_ sibling= (12) - prefixes (24)
-
previous
_ sibling= (12) - root (12)
-
root
_ node (12)
検索結果
先頭5件
-
REXML
:: Element # add _ namespace(prefix , uri) -> self (116.0) -
名前空間を要素に追加します。
...在する場合はそれが上書きされます。
@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("t... -
REXML
:: Element # delete _ namespace(namespace = "xmlns") -> self (116.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.r... -
REXML
:: Attributes # prefixes -> [String] (37.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...self の中で宣言されている prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.... -
REXML
:: Child # next _ sibling=(other) (37.0) -
other を self の次の隣接ノードとします。
...other を self の次の隣接ノードとします。
つまり、親ノードが持つ子ノード列の self の後ろに
other を挿入します。
@param other 挿入するノード
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Ele... -
REXML
:: Child # previous _ sibling=(other) (37.0) -
other を self の前の隣接ノードとします。
...other を self の前の隣接ノードとします。
つまり、親ノードが持つ子ノード列の self の前に
other を挿入します。
@param other 挿入するノード
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Eleme... -
REXML
:: Attributes # namespaces -> { String => String } (31.0) -
self の中で宣言されている名前空間の集合を返します。
...self の中で宣言されている名前空間の集合を返します。
返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xm... -
REXML
:: Element # has _ elements? -> bool (31.0) -
self が一つでも子要素を持つならば true を返します。
...self が一つでも子要素を持つならば true を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b/><c>Text</c></a>")
doc.root.has_elements? # => true
doc.elements["/a/b"].has_elements? # => false
# /a/c はテキストノードしか... -
REXML
:: Element # namespace(prefix=nil) -> String (31.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...self の文脈で prefix が指している名前空間の URI を返します。
prefix を省略すると、デフォルトの名前空間の URI を返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/... -
REXML
:: Element # namespaces -> {String => String} (31.0) -
self の文脈で定義されている名前空間の情報を返します。
...self の文脈で定義されている名前空間の情報を返します。
対象の要素とその外側の要素で定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Documen...