るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.132秒)

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document to_s
  4. rexml/document node_type
  5. rexml/document clone

ライブラリ

クラス

検索結果

REXML::Child#previous_sibling=(other) (78358.0)

other を self の前の隣接ノードとします。

other を self の前の隣接ノードとします。

つまり、親ノードが持つ子ノード列の self の前に
other を挿入します。

@param other 挿入するノード

//emlist[][ruby]{
require 'rexml/document'

a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d

p a.to_s # =>...

REXML::Child#next_sibling=(other) (24058.0)

other を self の次の隣接ノードとします。

other を self の次の隣接ノードとします。

つまり、親ノードが持つ子ノード列の self の後ろに
other を挿入します。

@param other 挿入するノード

//emlist[][ruby]{
require 'rexml/document'

a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d

p a.to_s # =>...