It's a bit of a hack....

I have another XML Pull Parser in the works that will do this verbatim no
problem.... but convincing a despot to approve the project request is a bit
trickier!

The current implementation is the ModifiedPomXMLEventReader which takes an
XMLEventReader, wraps it and keeps track of where in the input bytes each
tag corresponds to.

Then using mark methods I can mark regions of the xml file for later
replacement.

I need the ability to mark regions in order to work backwards!  But with my
full blown parser (which I will not have ready before my vacation) you just
cache all the events you might need to rewrite and then write them when you
are ready.

At least this current solution works and I can _put out there_!

On Thu, Aug 14, 2008 at 3:14 PM, Jason van Zyl <[EMAIL PROTECTED]> wrote:

>
> On 14-Aug-08, at 6:24 AM, Stephen Connolly wrote:
>
>  The versions-maven-plugin is now rewriting XML correctly after some
>> hackery
>> with woodstox and string index tracking!
>>
>
> How close is this what we're looking for with rewriting XML properly? Along
> the lines of what we were talking about with Aaron. I would like to
> integrate something into what Shane is doing with StAX as a general
> solution.
>
>
>>
>> I would like to push a snapshot build for others to test (without having
>> to
>> build from source)
>>
>> Before I go doing something wrong.... what do I need to do and how do I do
>> it!
>>
>> -Stephen
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> Three people can keep a secret provided two of them are dead.
>
>  -- Unknown
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to