public class XmlBlockFormatter
extends java.lang.Object
The xmlBlockFormatter takes as input a String representation of an .xml file
and formats matrix formatted content inside of it correctly by adding
whitespace.
The XmlBlockFormatter expects well formed XML, except for the blocks it will
handle itself, which are expected to be lines of data within a single XML
node, each separated by a newline character and no additional whitespace at
the start of each line. No tags should be present inside the block, and it is
expected that the tags beginning and ending the block are separated from the
first/last line by only a new line character and no additional white space.
The end result will be to shift each such line in the block content so that
they each begin one level of indentation further than the tags for the node
which contains it. The xml will be returned in the form of a byte array.
- Author:
- Robert Smith