Class NQXML::Document
In: nqxml/document.rb
examples/reverseTags.rb
Parent: Object
Methods
addToEpilogue    addToProlog    each_depthfirst_reversed    new    recurse    setRoot    setRootNode   
Attributes
:doctype  [R] 
:epilogue  [R] 
:prolog  [R] 
:rootNode  [R] 
Public Class methods
new()
Public Instance methods
addToProlog(entity)

Add entity to prolog. All syntax checks have already been made by the parser.

addToEpilogue(entity)

Add entity to epilogue. All syntax checks have already been made by the parser.

setRootNode(node)
setRoot(entity)
recurse(node, proc)

This method, called by each_depthfirst_reversed(), calls a proc for the entity in this node and then for all of its children in reverse order. If the node's entity is a tag, call the proc again after temporarily making the entity an end tag.

each_depthfirst_reversed(&block)

Yield each entity, starting at the root, with all children in reverse order.