1008件ヒット
[1-100件を表示]
(0.036秒)
別のキーワード
種類
- インスタンスメソッド (792)
- クラス (120)
- 特異メソッド (84)
- ライブラリ (12)
ライブラリ
- rexml (12)
-
rexml
/ document (984)
クラス
-
REXML
:: Attribute (36) -
REXML
:: Attributes (156) -
REXML
:: CData (36) -
REXML
:: Child (24) -
REXML
:: DocType (72) -
REXML
:: Document (36) -
REXML
:: Element (276) -
REXML
:: Elements (108) -
REXML
:: Entity (12) -
REXML
:: Instruction (24) -
REXML
:: Text (60) -
REXML
:: XPath (36)
キーワード
- << (12)
- Comment (12)
- Default (12)
- Entity (12)
- ExternalEntity (12)
- Instruction (12)
- NotationDecl (12)
- ParseException (12)
- Pretty (12)
- Transitive (12)
- XMLDecl (12)
- [] (24)
- []= (24)
- add (12)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ element (12) -
add
_ namespace (24) - attribute (12)
-
attribute
_ of (12) -
attributes
_ of (12) - content (12)
- delete (24)
-
delete
_ all (24) -
delete
_ attribute (12) -
delete
_ element (12) -
delete
_ namespace (12) - each (36)
-
each
_ attribute (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - encoding (12)
-
external
_ id (12) - first (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ text (12) -
has
_ elements? (12) - length (12)
- match (12)
- matches? (12)
- namespace (24)
- namespaces (24)
- new (24)
-
next
_ element (12) -
next
_ sibling= (12) - prefix (12)
- prefixes (24)
-
previous
_ sibling= (12) - public (12)
- root (12)
-
root
_ node (12) - size (24)
-
stand
_ alone? (12) - system (12)
- target (12)
- text (12)
- text= (12)
-
to
_ a (24) -
to
_ s (24) -
to
_ string (12) - unnormalize (12)
- value (24)
- value= (12)
- version (12)
- write (12)
- xpath (12)
検索結果
先頭5件
-
rexml
/ document (38018.0) -
DOM スタイルの XML パーサ。
...セスします。
以下のプログラムではブックマークの XML からデータを取り出します。
//emlist[][ruby]{
require 'rexml/document'
require 'pp'
Bookmark = Struct.new(:href, :title, :desc)
doc = REXML::Document.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<xbel ve... -
REXML
:: XMLDecl (8036.0) -
XML 宣言を表すクラス。
...L 宣言を表すクラス。
文書から XML 宣言を取り出すには REXML::Document#xml_decl を使います。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<e />
EOS
xml_decl = doc.xml_decl
xml_decl.ve......{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<e />
EOS
xml_decl = doc.xml_decl
xml_decl.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.standalone # => nil
xml_decl.writethis # => false
//}
//emlist[XML 宣言が encoding 属性を持たない場合の例][ruby]{
require......'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" ?>
<e />
EOS
xml_decl = doc.xml_decl
xml_decl.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.standalone # => nil
xml_decl.writethis # => true
//}... -
REXML
:: Elements # each(xpath = nil) {|element| . . . } -> [REXML :: Elements] (8018.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/> がブロックに渡... -
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (8018.0) -
すべての子要素の配列を返します。
...:XPath.match などと
異なり、要素以外の子ノードは無視されます。
@param xpath XPath文字列
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new '<a>sean<b/>elliott<c/></a>'
doc.root.elements.to_a # => [<b/>, <c/>]
doc.root.elements.to... -
REXML
:: Formatters :: Default (8018.0) -
XMLドキュメントを(文字列として)出力するクラスです。
...XML::Formatters::Pretty と
異なりテキストの改行や空白を修正せずにそのまま出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/default'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren/>
</children>
</root>
EOS
default_for... -
REXML
:: Formatters :: Pretty (8018.0) -
XMLドキュメントを(文字列として)見た目良く出力するクラスです。
...:Formatters::Default と
異なり見た目のためテキストの改行や空白を修正して出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/pretty'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren foo='bar'/>
</children>
</root>
EOS
pr... -
REXML
:: Formatters :: Transitive (8018.0) -
XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。
...役にたつかもしれません。
ただ、ほとんどの場合は奇妙な出力結果になるでしょう。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/transitive'
doc = REXML::Document.new <<EOS
<root><children>
<grandchildren foo='bar' />
</children></root>
EOS
t... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (8012.0) -
属性の名前空間の URI を返します。
...前空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_... -
REXML
:: Attribute # prefix -> String (8012.0) -
属性の名前空間を返します。
...属性の名前空間を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "...