408件ヒット
[201-300件を表示]
(0.052秒)
別のキーワード
ライブラリ
-
net
/ imap (36) - pstore (48)
-
rexml
/ document (252) -
rexml
/ streamlistener (36) -
rubygems
/ security (12) -
rubygems
/ server (12)
クラス
-
Gem
:: Security :: Policy (12) -
Gem
:: Server (12) -
Net
:: IMAP (36) - PStore (48)
-
RDoc
:: Options (12) -
REXML
:: Attributes (60) -
REXML
:: Element (132) -
REXML
:: Elements (60)
モジュール
キーワード
- [] (24)
- []= (12)
-
add
_ attribute (24) -
add
_ element (12) - attribute (12)
- delete (36)
-
delete
_ all (12) -
delete
_ element (12) -
delete
_ namespace (12) - doctype (12)
- each (12)
-
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - elementdecl (12)
- entitydecl (12)
- fetch (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ text (12) - getquota (12)
- getquotaroot (12)
- root= (12)
- root? (12)
- setquota (12)
- text (12)
- text= (12)
-
to
_ a (12) - transaction (12)
-
verify
_ root= (12)
検索結果
先頭5件
-
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (31.0) -
namespace と name で特定される属性を返します。
...。
@param 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_elements("/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/fo... -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (31.0) -
name で指定される属性を返します。
...。
@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//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.attribute("att") # => att='<'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}... -
REXML
:: Elements # each(xpath = nil) {|element| . . . } -> [REXML :: Elements] (31.0) -
全ての子要素に対しブロックを呼び出します。
...とに注意してください。
@param xpath XPath文字列
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
# <b/>,<c/>,<d/>,<b/>,<c/>, <d/> がブロックに渡される
doc.root.elements.each {|e|p e}
# <b/>, <b/......される
doc.root.elements.each('b') {|e|p e} #-> Yields b, b elements
# <b/>,<c/>,<d/>,<b/>,<c/>,<d/> がブロックに渡される
doc.root.elements.each('child::node()') {|e|p e}
# <b/>,<c/>,<d/>,"sean",<b/>,<c/>,<d/> がブロックに渡される
REXML::XPath.each(doc.root, 'child::node()')... -
PStore
# delete(name) -> object (25.0) -
ルートnameに対応する値を削除します。
...。
@param name 探索するルート。
@return 削除した値を返します。
@raise PStore::Error トランザクション外でこのメソッドが呼び出された場合に発生します。
例:
require 'pstore'
db = PStore.new("/tmp/foo")
db.transaction do
p db.roots......# => []
ary = db["root"] = [1,2,3,4]
ary[0] = [1,1.5]
end
db.transaction do |pstore|
pstore.delete("root") # => [[1, 1.5], 2, 3, 4]
pstore.delete("root") # => nil
end
@see Hash#delete... -
REXML
:: Attributes # [](name) -> String | nil (25.0) -
属性名nameの属性値を返します。
...ます。
@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_elements("/root/a").first
p... -
REXML
:: Attributes # delete(attribute) -> REXML :: Element (25.0) -
指定した属性を取り除きます。
...self が属する要素(REXML::Element)を返します。
@param attribute 取り除く属性(文字列もしくは REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://e......xample.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attributes.delete("att") # => <a foo:att='1' bar:att='2'/>
a.attributes.delete("foo:att") # => <a bar:att='2'/>
attr = a.attributes.get_attribute("bar:att")
a.attributes.delete(attr)... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (25.0) -
name という名前を持つ属性をすべて削除します。
...す。
@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_elements("/root/a").firs... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (25.0) -
name という名前の属性を取得します。
...します。
@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='<'/>
</root>
EOS
a = doc.ge... -
REXML
:: Element # delete _ element(element) -> REXML :: Element (25.0) -
子要素を削除します。
...、XPath としてマッチする要素を削除します。
複数の要素がマッチする場合はそのうち1つが削除されます。
@param element 削除する要素
@see REXML::Elements#delete
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b/><c/><c id="1"/>......nt("/a/b")
doc.to_s # => "<a><c/><c id='1'/><d/><c/></a>"
doc.delete_element("a/c[@id='1']")
doc.to_s # => "<a><c/><d/><c/></a>"
doc.root.delete_element("c")
doc.to_s # => "<a><d/><c/></a>"
doc.root.delete_element("c")
doc.to_s # => "<a><d/></a>"
doc.root.delete_element(1)
doc.to_s # => "<a/>"
//}...