Well as the initial author of tidy and versions it should be no surprise
that I use the same tricks!

I had been working on a verbatim XML pull parser implementation... Always
ends up on the back burner.

Basically my idea is to store the actual verbatim text in the XML event
objects. That way if you get passed one from the reader you just output the
raw input, if you get passed a programmatically created one then you create
the output.

There are two modes of an XML pull parser, the mode that passes INTs as
event types and the mode that passes event objects. This trick can only
work with the latter obviously.

When writing both of those plugins I used the plan of my design as a seed
for the architecture... I do note, however, that it's 6-7 years now that I
have been trying and failing to write this pull parser.

On Thursday, September 3, 2015, Barrie Treloar <[email protected]> wrote:

> tidy-maven-plugin (https://github.com/mojohaus/tidy-maven-plugin) works
> similar to versions plugin.
>
> It uses a String copy of pom and for the non-trivial tidy tasks an
> XMLEventReader from StAX api to manipulate rewrites, and
> plexus.util.FileUtils.fileWrite to write the pom file out.
>


-- 
Sent from my phone

Reply via email to