528件ヒット
[201-300件を表示]
(0.091秒)
ライブラリ
-
net
/ imap (36) - pstore (84)
- psych (12)
-
rexml
/ document (288) -
rexml
/ streamlistener (36) - rss (36)
-
rubygems
/ security (12) -
rubygems
/ server (12)
クラス
-
Gem
:: Security :: Policy (12) -
Gem
:: Server (12) -
Net
:: IMAP (36) - PStore (84)
-
Psych
:: TreeBuilder (12) -
RDoc
:: Options (12) -
REXML
:: Attributes (72) -
REXML
:: CData (24) -
REXML
:: Element (132) -
REXML
:: Elements (60)
モジュール
-
REXML
:: StreamListener (36) -
RSS
:: RootElementMixin (36)
キーワード
- [] (24)
- []= (24)
- abort (12)
-
add
_ attribute (24) -
add
_ element (12) - attribute (12)
- commit (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)
-
output
_ encoding (12) -
output
_ encoding= (12) - root= (12)
- root? (12)
- roots (12)
- setquota (12)
- text (12)
- text= (12)
-
to
_ a (12) -
to
_ s (12) -
to
_ xml (12) - transaction (12)
- value (12)
-
verify
_ root= (12)
検索結果
先頭5件
- REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () - REXML
:: Elements # [](index , name = nil) -> REXML :: Element | nil - PStore
# delete(name) -> object - REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () - REXML
:: Element # text=(text)
-
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (49.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...)。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.ea......| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute('id', '1', 0, 'd'){|e| p e }
# >>... -
REXML
:: Elements # [](index , name = nil) -> REXML :: Element | nil (49.0) -
index が指し示している要素を返します。
...す。
@param index 取り出したい要素の index (整数)もしくは xpath (文字列)
@param name 子要素の名前(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b/><c id="1"/><c id="2"/><d/></a>'
doc.root.elements[1] # => <b/>
doc.root.elements......['c'] # => <c id='1'/>
doc.root.elements[2,'c'] # => <c id='2'/>
doc = REXML::Document.new '<a><b><c /><a id="1"/></b></a>'
doc.root.elements["a"] # => nil
doc.root.elements["b/a"] # => <a id='1'/>
doc.root.elements["/a"] # => <a> ... </>
//}... -
PStore
# delete(name) -> object (43.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
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (43.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...ありません)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_......text {|e|p e}
# >> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
REXML
:: Element # text=(text) (37.0) -
「先頭の」テキストノードを text で置き換えます。
...削除されます。
@param text 置き換え後のテキスト(文字列、REXML::Text, nil(削除))
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/></a>')
doc.to_s # => "<a><b/></a>"
doc.root.text = "Foo"; doc.to_s # => "<a><b/>Foo</a>"
doc.root.text = "Bar"; doc.to......_s # => "<a><b/>Bar</a>"
doc.root.add_element "c"
doc.root.text = "Baz"; doc.to_s # => "<a><b/>Baz<c/></a>"
doc.root.text = nil; doc.to_s # => "<a><b/><c/></a>"
//}... -
REXML
:: StreamListener # doctype(name , pub _ sys , long _ name , uri) -> () (37.0) -
文書型宣言(DTD)をパースしたときに呼び出されるコールバックメソッドです。
...している場合には nil が渡されます。
@param name 宣言されているルート要素名が文字列で渡されます。
@param pub_sys "PUBLIC" もしくは "SYSTEM" が渡されます。nilが渡される場合もあります。
@param long_name "SYSTEM" の場合はシステム識......す
@param uri "SYSTEM" の場合は nil が、"PUBLIC" の場合はシステム識別子が渡されます
=== 例
<!DOCTYPE me PUBLIC "foo" "bar">
というDTDに対しては
name: "me"
pub_sys: "PUBLIC"
long_name: "foo"
uri: "bar"
という引数が渡されます。
<!DOCTYPE root [.........
というDTDに対しては
name: "root"
pub_sys: nil
long_name: nil
uri: nil
という引数が渡されます。... -
PStore
# transaction(read _ only = false) {|pstore| . . . } -> object (31.0) -
トランザクションに入ります。 このブロックの中でのみデータベースの読み書きができます。
...み専用のトランザクションが使用可能です。
@param read_only 真を指定すると、読み込み専用のトランザクションになります。
@return ブロックで最後に評価した値を返します。
@raise PStore::Error read_only を真にしたときに、デー......した場合に発生します。
例:
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(true) do |pstore|
pstore["root"] = 'aaa' # => ここで例外発生
end... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (31.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......t_elements("/root/a").first
a.attributes.get_attribute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
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...