6件ヒット
[1-6件を表示]
(0.017秒)
種類
- 特異メソッド (3)
- インスタンスメソッド (3)
クラス
-
REXML
:: Attribute (1) -
REXML
:: Element (1) -
REXML
:: Instruction (3) -
REXML
:: Text (1)
検索結果
先頭5件
- REXML
:: Instruction # target -> String - REXML
:: Instruction # target=(value) - REXML
:: Element . new(arg = UNDEFINED , parent = nil , context = nil) -> REXML :: Element - REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) - REXML
:: Attribute # namespace(arg = nil) -> String | nil
-
REXML
:: Instruction # target -> String (18307.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... -
REXML
:: Instruction # target=(value) (18307.0) -
XML 処理命令のターゲットを value に変更します。
XML 処理命令のターゲットを value に変更します。
@param value 新たなターゲット(文字列) -
REXML
:: Element . new(arg = UNDEFINED , parent = nil , context = nil) -> REXML :: Element (400.0) -
要素オブジェクトを生成します。
要素オブジェクトを生成します。
arg が文字列の場合、新たな要素の名前は arg に設定されます。
arg が REXML::Element オブジェクトの場合は、
新たな要素の名前、属性、context が arg のもので初期化されます。
parent で親ノードを指定します。
context には hash table で要素のコンテキストを指定します。
基本的には text node (REXML::Text) での特別な文字、特に空白について
の取り扱いを指定できます。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
... -
REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) (400.0) -
テキストノードオブジェクトを生成します。
...L::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">
<!ENTITY % q "q... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (346.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_attrib... -
REXML
:: Instruction . new(target , content = nil) -> REXML :: Instruction (307.0) -
新たな Instruction オブジェクトを生成します。
新たな Instruction オブジェクトを生成します。
@param target ターゲット
@param content 内容