61件ヒット
[1-61件を表示]
(0.034秒)
種類
- インスタンスメソッド (33)
- クラス (22)
- 文書 (6)
ライブラリ
-
rexml
/ document (55)
クラス
-
REXML
:: Attribute (11) -
REXML
:: Element (22)
キーワード
- Default (11)
-
NEWS for Ruby 2
. 6 . 0 (6) - Transitive (11)
- text (11)
検索結果
先頭5件
-
REXML
:: Element # xpath -> String (18230.0) -
文書上の対象の要素にのみマッチする xpath 文字列を返します。
...書上の対象の要素にのみマッチする xpath 文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/><c/></a>')
c = doc.root.elements[2] # <a> .. </a> の中の <c/> 要素
c # => <c/>
c.xpath # => "/a/c"
doc = REXML::Document.new('<a><b/><......b/></a>')
b = doc.root.elements[2] # <a> .. </a> の中の2番目の <b/> 要素
b # => <b/>
b.xpath # => "/a/b[2]"
//}... -
REXML
:: Attribute # xpath -> String (18218.0) -
その属性を指定する xpath 文字列を返します。
...その属性を指定する xpath 文字列を返します。
例えば "/foo/bar/@ns:r" という文字列を返します。... -
REXML
:: Element # text(path = nil) -> String | nil (113.0) -
先頭のテキスト子ノードの文字列を返します。
...参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。
テキストノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#get_text
//emlist[][ruby]{
requir... -
NEWS for Ruby 2
. 6 . 0 (78.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ンスを返すようになりました。
* Regexp/String
* Unicode のバージョンを 10.0.0 から 11.0.0 に更新しました。 14802
これは書記素クラスタ (/\X/) アルゴリズムの書き換えと String#downcase での
Georgian MTAVRULI の special-casi......"require(feature)" で読み込むファイルを
特定します。 [実験的] 15230
* String
* String#crypt は非推奨になりました。 14915
* 新機能
* String#split はブロックが渡されていたら部分文字列ごとに呼び出すようになりまし......い。
* いくつかの XPath 実装を改善:
* concat() 関数: 結合前に全ての引数を文字列化
* string() 関数: コンテキストノードをサポート
* string() 関数: 処理命令 (PI) ノードをサポート
* XPath 2.0 で"*:#{ELEMENT_NAME}" 記... -
REXML
:: Formatters :: Default (24.0) -
XMLドキュメントを(文字列として)出力するクラスです。
...tters::Default.new
output = StringIO.new
default_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren/>\n</children>\n</root>\n"
output = StringIO.new
default_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children>\n <grand......children/>\n</children>"
ie_hack_formatter = REXML::Formatters::Default.new(true)
output = StringIO.new
ie_hack_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren />\n</children>\n</root>\n"
//}... -
REXML
:: Formatters :: Transitive (24.0) -
XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。
...sitive_formatter = REXML::Formatters::Transitive.new
output = StringIO.new
transitive_formatter.write(doc, output)
output.string
# => "<root\n><children\n >\n<grandchildren foo='bar'\n />\n</children\n ></root\n>\n"
print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo......='bar'
# >> />
# >> </children
# >> ></root
# >> >
output = StringIO.new
transitive_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}...