121件ヒット
[1-100件を表示]
(0.112秒)
別のキーワード
種類
- インスタンスメソッド (77)
- クラス (22)
- ライブラリ (11)
- 特異メソッド (11)
ライブラリ
-
rexml
/ document (110)
クラス
-
REXML
:: Document (33) -
REXML
:: Instruction (22) -
REXML
:: XMLDecl (33)
キーワード
- == (11)
- Instruction (11)
- XMLDecl (11)
- content (11)
- encoding (11)
- new (11)
-
stand
_ alone? (11) - target (11)
- xmldecl (11)
検索結果
先頭5件
-
rexml
/ document (38024.0) -
DOM スタイルの XML パーサ。
...L からデータを取り出します。
//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 version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>... -
REXML
:: Document # version -> String (26125.0) -
XML 宣言に含まれている XML 文書のバージョンを返します。
...XML 宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.version # => "1.0"
//}... -
REXML
:: Document # encoding -> String (14125.0) -
XML 宣言に含まれている XML 文書のエンコーディングを返します。
...宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.encoding # => "UTF-8"
//}... -
REXML
:: XMLDecl . new(version = REXML :: XMLDecl :: DEFAULT _ VERSION , encoding = nil , standalone = nil) (8321.0) -
新たな XMLDecl オブジェクトを生成して返します。
...新たな XMLDecl オブジェクトを生成して返します。
version 以外は省略可能です。
@param version バージョン(文字列)
@param encoding エンコーディング(文字列 or nil)
@param standalone スタンドアロン文章かどうか("yes", "no", nil)... -
REXML
:: XMLDecl # xmldecl(version , encoding , standalone) -> () (8214.0) -
内容を更新します。
...内容を更新します。
@param version バージョン(文字列)
@param encoding エンコーディング(文字列 or nil)
@param standalone スタンドアロン文章かどうか("yes", "no", nil)... -
REXML
:: XMLDecl (8078.0) -
XML 宣言を表すクラス。
...#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.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.standalone # => "yes"
xml_decl.wri......合の例。][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]{
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
:: Instruction (8024.0) -
XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
...れます。
XML 宣言(文書先頭の <?xml version=... ?>)はXML処理命令ではありませんが、
似た見た目を持っています。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" hr... -
REXML
:: Document # stand _ alone? -> String (8018.0) -
XML 宣言の standalone の値を文字列で返します。
...XML 宣言の standalone の値を文字列で返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.stand_alone? # => "yes"
//}... -
REXML
:: Instruction # content -> String | nil (8018.0) -
XML 処理命令の内容を返します。
...XML 処理命令の内容を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-... -
REXML
:: Instruction # target -> String (8018.0) -
XML 処理命令のターゲットを返します。
...XML 処理命令のターゲットを返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-st...