There really are a couple options:

1) Write a databinding - since your code already uses Stax, this usually isn't 
hard.   You pretty much just need to wrapper it with our Reader/Writer 
interfaces.   The XMLBeans or SDO databinding (sdo is on trunk only right now) 
would be good starting points to look at.

2) Provider based service - if your service is implemented via the Provider 
interface, you can get a StaxSource and use that however you please.


Dan


On Fri December 11 2009 3:41:31 pm Matthew Pocock wrote:
> Hi,
> 
> We have legacy code using stax for marshalling and unmarshalling our data.
> For architectural issues (now fixed in stone) we are not able to use JAXB
>  or one of the other off-the-shelf solutions, as our APIs tightly control
>  the lifecycle of the objects they manage. So what we would like to do is
>  tell stax that it should give our code a stax reader or writer and let our
>  code get on with the job.
> 
> Is this possible? I have spent an hour googling, but haven't turned up an
> example yet. I may be searching with the wrong words though.
> 
> Thanks,
> 
> Matthew
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to