1152件ヒット
[1-100件を表示]
(0.060秒)
別のキーワード
種類
- インスタンスメソッド (840)
- 特異メソッド (156)
- クラス (132)
- ライブラリ (24)
ライブラリ
- rexml (12)
-
rexml
/ document (1116)
クラス
-
REXML
:: Attribute (36) -
REXML
:: Attributes (156) -
REXML
:: CData (36) -
REXML
:: Child (24) -
REXML
:: DocType (108) -
REXML
:: Document (84) -
REXML
:: Element (276) -
REXML
:: Elements (108) -
REXML
:: Entity (24) -
REXML
:: Instruction (24) -
REXML
:: Text (60) -
REXML
:: XPath (36)
モジュール
-
REXML
:: Security (24)
キーワード
- << (12)
- Comment (12)
- Default (12)
- Entity (12)
- ExternalEntity (12)
- Instruction (12)
- NotationDecl (12)
- ParseException (12)
- Pretty (12)
- Text (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)
- entities (12)
- entity (12)
-
entity
_ expansion _ limit (12) -
entity
_ expansion _ limit= (12) -
entity
_ expansion _ text _ limit (24) -
entity
_ expansion _ text _ limit= (24) -
external
_ id (12) - first (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ text (12) -
has
_ elements? (12) - length (12)
- match (12)
- matches? (12)
- name (12)
- namespace (24)
- namespaces (24)
- new (24)
-
next
_ element (12) -
next
_ sibling= (12) - prefix (12)
- prefixes (24)
-
previous
_ sibling= (12) - public (12)
- rexml (12)
- root (12)
-
root
_ node (12) - size (24)
-
stand
_ alone? (12) - system (12)
- target (12)
- text (12)
- text= (12)
-
to
_ a (24) -
to
_ s (36) -
to
_ string (12) - unnormalize (12)
- value (24)
- value= (12)
- version (12)
- write (12)
- xpath (12)
検索結果
先頭5件
-
rexml
/ document (38072.0) -
DOM スタイルの XML パーサ。
...[][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 version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>オブジェクト指向スクリプト言語 Ruby</......title>
<desc>Rubyの公式サイト</desc>
</bookmark>
<bookmark href="http://rurema.clear-code.com/">
<title>最速Rubyリファレンスマニュアル検索! | るりまサーチ</title>
<desc>Rubyリファレンスマニュアルを全文検索できる。
とても便利。......okmark>
<bookmark href="https://github.com/rurema/bitclust">
<title>rurema/bitclust · GitHub</title>
</bookmark>
<bookmark href="https://rubygems.org/gems/bitclust-core" />
</xbel>
XML
bookmarks = REXML::XPath.match(doc, "/xbel/bookmark").map do |bookmark|
href = bookmark.attribute("hr... -
REXML
:: XMLDecl (8036.0) -
XML 宣言を表すクラス。
...XML 宣言を表すクラス。
文書から 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.......][ruby]{
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]{
r......equire '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
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) (8018.0) -
テキストノードオブジェクトを生成します。
...r テキストがXMLのテキストとして不正な
文字を含んでいる場合に発生します。
//emlist[doctype なしの場合][ruby]{
p REXML::Text.new("<&", false, nil, false).to_s # => "<&"
p REXML::Text.new("<&", false, nil, false).to_s # => "&lt;&amp;"......"
p REXML::Text.new("<&", false, nil, true).to_s # parse error
//}
//emlist[doctype があり、実体が宣言されている場合][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root [
<!ENTITY p "foobar publisher">
<!ENTIT... -
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.g... -
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 # -> "... -
REXML
:: Attribute # to _ string -> String (8012.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}... -
REXML
:: Attributes # [](name) -> String | nil (8012.0) -
属性名nameの属性値を返します。
...ださい。
nameという属性名の属性がない場合は nil を返します。
@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' b... -
REXML
:: Attributes # []=(name , value) (8012.0) -
指定した属性を更新します。
...。
既に同じ名前の属性がある場合は上書きされ、
そうでない場合は属性が追加されます。
//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... -
REXML
:: Attributes # delete(attribute) -> REXML :: Element (8012.0) -
指定した属性を取り除きます。
...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://example.org/bar">
<a foo:att='1...