- Defined in:
The Transitive formatter writes an XML document that parses to an identical document as the source document. This means that no extra whitespace nodes are inserted, and whitespace within text nodes is preserved. Within these constraints, the document is pretty-printed, with whitespace inserted into the metadata to introduce formatting.
Note that this is only useful if the original XML is not already formatted. Since this formatter does not alter whitespace nodes, the results of formatting already formatted XML will be odd.
Instance Method Summary collapse
#initialize(indentation = 2, ie_hack = false) ⇒ Transitive
A new instance of Transitive.
Methods inherited from
#initialize(indentation = 2, ie_hack = false) ⇒
Returns a new instance of Transitive.
15 16 17 18 19
# File 'lib/rexml/formatters/transitive.rb', line 15 def initialize( indentation=2, ie_hack=false ) @indentation = indentation @level = 0 @ie_hack = ie_hack end