Nokogiri::Node
http://nokogiri.org/Nokogiri/XML/Node.html
気になったメソッドをメモ
add_child(node_or_tags)
NodeにNodeを挿入できる。同じような感じのメソッドに
- add_next_sibling(node_or_tags)
- add_previous_sibling(node_or_tags)
- after
- before
等がある
remove()
自分のNodeを削除できる
replace(node_or_tags)
ancestors(selector = nil)
祖先のノードのリストを返す。
[], attribute(p1)
それぞれ属性ノードを返す。attribute_nodesだとattributesのノードの配列(たぶん)を返す。
path()
自分のパスを返す