Module REXML::Node
In: rexml/node.rb

Represents a node in the tree. Nodes are never encountered except as superclasses of other objects. Nodes have siblings.

ツリーのノードを表現します。ノードは決して他のオブジェクトのスーパー クラスのようなものを除いては、決して衝突しません。ノードは兄妹姉妹 たちを持ちます。

Methods
indent    next_sibling_node    previous_sibling_node    read_with_substitution    to_s    write_with_substitution   
Public Class methods
read_with_substitution( input, illegal=nil )

Reads text, substituting entities

テキストを読んで、要素を置換しています。

Public Instance methods
next_sibling_node()

@return the next sibling (nil if unset)

@次の兄弟姉妹(もし設定されていなければnil)を返します。

previous_sibling_node()

@return the previous sibling (nil if unset)

@前の兄弟姉妹(もし設定されていなければnil)を返します。

to_s(indent=-1)
indent(to, ind)
write_with_substitution(out, input)

Writes out text, substituting special characters beforehand.

@param out A String, IO, or any other object supporting <<( String )

@param input the text to substitute and the write out

z=utf8.unpack("U*") ascOut="" z.each{|r|

  if r <  0x100
    ascOut.concat(r.chr)
  else
    ascOut.concat(sprintf("&#x%x;", r))
  end

} puts ascOut

あらかじめ特殊な文字で置換されたテキストを書き出します。

@パラメータoutはString、IO、あるいは他の<<( String)をサポートし ているオブジェクトです。

@パラメータinputは置換され、書き出されるテキストです。

z=utf8.unpack("U*") ascOut="" z.each{|r|

  if r <  0x100
    ascOut.concat(r.chr)
  else
    ascOut.concat(sprintf("&#x%x;", r))
  end

} puts ascOut