8件ヒット
[1-8件を表示]
(0.092秒)
クラス
-
REXML
:: Attribute (1) -
REXML
:: Attributes (1) -
REXML
:: Comment (1) -
REXML
:: DocType (2) -
REXML
:: Element (2)
モジュール
-
REXML
:: Node (1)
キーワード
- [] (1)
-
add
_ element (1) -
attribute
_ of (1) - entity (1)
- namespace (1)
- string= (1)
- text (1)
-
to
_ s (1)
検索結果
先頭5件
-
REXML
:: Comment # string=(value) (36634.0) -
コメント文字列を設定します。
コメント文字列を設定します。
@param value 設定する文字列 -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (652.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...かの場合は nil を返します。
@param element 要素名(文字列)
@param attribute 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (634.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
:: Attributes # [](name) -> String | nil (634.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' bar:att... -
REXML
:: DocType # entity(name) -> String | nil (634.0) -
name という実体参照名を持つ実体を文字列で返します。
name という実体参照名を持つ実体を文字列で返します。
返される文字列は非正規化(REXML::Entity#unnormalized 参照)
された文字列が返されます。
name という名前を持つ実体が存在しない場合には nil を返します。
@param name 実体参照名(文字列)
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.entity("bar") # => "ba... -
REXML
:: Element # text(path = nil) -> String | nil (634.0) -
先頭のテキスト子ノードの文字列を返します。
...トノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#get_text
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </p>) は2つのテキストノード("some te... -
REXML
:: Node # to _ s(indent = -1) -> String (634.0) -
ノードを文字列に変換します。
ノードを文字列に変換します。
@param indent このパラメータは deprecated で、無視されます -
REXML
:: Element # add _ element(element , attrs = nil) -> Element (118.0) -
子要素を追加します。
...された要素です。
@param element 追加する要素
@param attrs 追加する要素に設定する属性
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a/>')
el = doc.root.add_element 'my-tag' # => <my-tag/>
doc.root.to_s # => "<a><my-tag/></a>"
el = doc.root.add_ele...