| Class | HTree::Doc |
| In: |
htree/doc.rb
htree/modules.rb |
| Parent: | Object |
The arguments should be a sequence of follows.
doc.subst_subnode(pairs) -> doc
The argument pairs should be a hash or an assocs. Its key should be an integer which means an index for children.
Its value should be one of follows.
d = HTree('<a/><b/><c/>')
p d.subst_subnode({0=>HTree('<x/>'), 2=>HTree('<z/>')})
p d.subst_subnode([[0,HTree('<x/>')], [2,HTree('<z/>')]])
# =>
#<HTree::Doc {emptyelem <x>} {emptyelem <b>} {emptyelem <z>}>
#<HTree::Doc {emptyelem <x>} {emptyelem <b>} {emptyelem <z>}>