別のキーワード
種類
- インスタンスメソッド (620)
- 特異メソッド (124)
- ライブラリ (36)
- 文書 (12)
- クラス (12)
ライブラリ
-
cgi
/ util (48) - matrix (204)
-
rexml
/ document (492) - rss (12)
クラス
- CGI (48)
- Matrix (84)
-
REXML
:: Attributes (144) -
REXML
:: Element (156) -
REXML
:: Elements (168) -
REXML
:: XPath (12) -
RSS
:: Rss :: Channel :: Item :: Guid (12) - Vector (120)
キーワード
- * (24)
- << (12)
- Elements (12)
- [] (24)
- []= (24)
- add (12)
-
add
_ element (12) - attribute (12)
- build (24)
- collect (36)
- combine (24)
- delete (24)
-
delete
_ all (24) -
delete
_ element (12) - each (24)
-
each
_ attribute (12) -
elements
_ to _ f (24) -
elements
_ to _ i (24) -
elements
_ to _ r (24) - empty? (12)
- escapeElement (12)
-
escape
_ element (12) - first (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ elements (12) -
has
_ elements? (12) - index (12)
- inject (12)
- isPermaLink (12)
- length (12)
- map (24)
- namespace (12)
- namespaces (24)
- new (12)
-
next
_ element (12) - prefixes (24)
-
rdoc
/ parser / c (12) -
rexml
/ document (12) -
rexml
/ parsers / sax2parser (12) - root (12)
-
root
_ node (12) -
ruby 1
. 8 . 4 feature (12) - size (24)
-
to
_ a (12) - unescapeElement (12)
-
unescape
_ element (12) - xpath (12)
検索結果
先頭5件
-
REXML
:: Attributes # prefixes -> [String] (6.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...'
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.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Attributes # size -> Integer (6.0) -
属性の個数を返します。
...ます。
//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
p a.attributes.length # => 3
//}... -
REXML
:: Element # add _ element(element , attrs = nil) -> Element (6.0) -
子要素を追加します。
...'val1' attr2='val2'/>
doc.root.to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/></a>"
el = REXML::Element.new 'my-tag'
doc.root.add_element el # => <my-tag/>
doc.root.to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/><my-tag/></a>"
//}
@see REXML::Elements#add, REXML::Element.new... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (6.0) -
name で指定される属性を返します。
...ot 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.attribute("att") # => att='<'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar... -
REXML
:: Element # delete _ element(element) -> REXML :: Element (6.0) -
子要素を削除します。
...除します。
複数の要素がマッチする場合はそのうち1つが削除されます。
@param element 削除する要素
@see REXML::Elements#delete
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b/><c/><c id="1"/><d/><c/></a>'
doc.delete_element("/a/b")
doc.... -
REXML
:: Element # namespaces -> {String => String} (6.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
:: Element # prefixes -> [String] (6.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
...字列の配列を返します。
対象の要素とその外側の要素で定義されている 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'].prefixes # => ["x", "y"]
//}... -
REXML
:: XPath . first(element , path = nil , namespaces = {} , variables = {}) -> Node | nil (6.0) -
element の path で指定した XPath 文字列にマッチする最初のノードを 返します。
...ML::Document.new(<<EOS)
<root xmlns:x='1'>
<a>
<b>b1</b>
<x:c />
<b>b2</b>
<d />
</a>
<b> b3 </b>
</root>
EOS
a = doc.root.elements[1] # => <a> ... </>
b1 = REXML::XPath.first(a, "b")
b1.text # => "b1"
REXML::XPath.first(doc, "/root/a/x:c") # => <x:c/>
REXML::XPath.first(a, "... -
RSS
:: Rss :: Channel :: Item :: Guid # isPermaLink (6.0) -
@todo
...@todo
* http://purl.org/dc/elements/1.1/...