979件ヒット
[1-100件を表示]
(0.111秒)
種類
- インスタンスメソッド (737)
- 特異メソッド (220)
- クラス (22)
クラス
-
REXML
:: AttlistDecl (22) -
REXML
:: Attribute (33) -
REXML
:: Attributes (33) -
REXML
:: CData (11) -
REXML
:: Child (33) -
REXML
:: Comment (22) -
REXML
:: DocType (88) -
REXML
:: Document (66) -
REXML
:: Element (154) -
REXML
:: Elements (77) -
REXML
:: Entity (99) -
REXML
:: Instruction (22) -
REXML
:: NotationDecl (22) -
REXML
:: Parent (66) -
REXML
:: Text (66) -
REXML
:: XMLDecl (66) -
REXML
:: XPath (33)
モジュール
-
REXML
:: Namespace (11) -
REXML
:: Node (33)
キーワード
- << (11)
- Entity (11)
- NotationDecl (11)
- [] (44)
- add (11)
-
add
_ element (11) - attribute (11)
-
attribute
_ of (11) - collect (11)
- content (11)
- context (11)
- delete (11)
-
delete
_ at (11) -
delete
_ attribute (11) - doctype (22)
- document (22)
- each (33)
-
each
_ element (11) -
each
_ element _ with _ attribute (11) -
each
_ element _ with _ text (11) - encoding (11)
- encoding= (11)
- entity (11)
- external (11)
-
external
_ id (11) -
find
_ first _ recursive (11) - first (11)
-
get
_ attribute (11) -
get
_ attribute _ ns (11) -
get
_ text (11) -
has
_ name? (11) - index (11)
- inject (11)
- match (11)
- namespace (22)
- namespaces (11)
- ndata (11)
- new (165)
-
next
_ element (11) -
next
_ sibling _ node (11) - normalize (11)
- normalized (11)
- notation (11)
- parent (11)
-
previous
_ element (11) -
previous
_ sibling _ node (11) - pubid (11)
- public (22)
- ref (11)
-
replace
_ child (11) - root (11)
-
stand
_ alone? (11) - standalone (11)
- system (22)
- text (11)
-
to
_ a (11) -
to
_ s (11) - unnormalize (11)
- unnormalized (11)
- value (22)
- write (22)
-
xml
_ decl (11) - xmldecl (11)
検索結果
先頭5件
- REXML
:: Text . unnormalize(string , doctype = nil , filter = nil , illegal = nil) -> String - REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () - REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () - REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil - REXML
:: Attributes # get _ attribute(name) -> Attribute | nil
-
REXML
:: Text . unnormalize(string , doctype = nil , filter = nil , illegal = nil) -> String (12511.0) -
string を非正規化(すべての entity をアンエスケープ)したものを 返します。
...string を非正規化(すべての entity をアンエスケープ)したものを
返します。
filter でアンエスケープしない実体の実体名を文字列配列で指定します。
@param string 非正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@par......m filter アンエスケープしない実体の実体名(文字列配列)
@param illegal 内部用。使わないでください。
//emlist[][ruby]{
require 'rexml/text'
REXML::Text.unnormalize("& &foobar; <") # => "& &foobar; <"
REXML::Text.unnormalize("< >", nil, ["lt"]) # => "<... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (12510.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...mlist[][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_wit......h_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (12504.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...を呼び出します。
key で指定した属性名の属性を持つ要素のみを対象とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max......@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.each_element_with_attribute('id'){|e| p......>> <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 }
# >> <d id='1'... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (12421.0) -
namespace と name で特定される属性を返します。
...る属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使......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").fir......st
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/foo", "attt") # => nil
//}... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (12409.0) -
name という名前の属性を取得します。
...場合は nil を返します。
@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.get_elements("/root/a").first
a.attributes.get_attribute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (12409.0) -
要素から key という属性名の属性を削除します。
...合は削除されずに、nil を返します。
@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # =>......<E x='foo' y:x='bar'/>
e.delete_attribute("x"); e # => <E y:x='bar'/>
//}... -
REXML
:: Element # previous _ element -> Element | nil (12409.0) -
前の兄弟要素を返します。
...前の兄弟要素を返します。
前の要素が存在しない場合は nil を返します。... -
REXML
:: Parent # replace _ child(to _ replace , replacement) -> () (12408.0) -
子ノード列上の to_replace を replacement に置き換えます。
...子ノード列上の to_replace を replacement に置き換えます。
to_replace の parent は nil に、
replacement の parent は selfに変更されます。
@param to_replace 置き換え元のノード
@param replacement 置き換え先のノード... -
REXML
:: Text . normalize(input , doctype = nil , entity _ filter = nil) -> String (12404.0) -
input を正規化(すべての entity をエスケープ)したものを 返します。
...input を正規化(すべての entity をエスケープ)したものを
返します。
@param input 正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@param entity_filter 置換したい実体の名前の配列... -
REXML
:: DocType # external _ id -> String | nil (12315.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...PUBLIC" の
いずれかの文字列を返します。
それ以外の場合は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-......strict.dtd">
EOS
doctype.name # => "html"
doctype.external_id # => "PUBLIC"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
]>
EOS
doctype.name # => "books"
doctype.......external_id # => nil
//}...