Hello Werner,

I've found workaround, generate XML using Castor, then append comments where
needed using XSLT.

Regards,
Stevo.


On Mon, Nov 29, 2010 at 7:14 PM, Werner Guttmann <[email protected]>wrote:

> Hi Stevo,
>
> I just had a look at the MarshalListener class and its usage from
> Marshaller. Whilst it should be quite straight-foward to extend the
> interface, I am not so sure it will be easy to pinpoint a good location
> where the new functionality could/should be made available from within
> Marshaller - the problem being that one could easily corrupt the XML being
> produced.
>
> Any opinions on your side ?
>
> Regards
> Werner
>
>
> On 24.11.2010 11:55, Stevo Slavić wrote:
>
>> Just found, there is org.exolab.castor.xml.MarshalListener interface, but
>> it
>> seems to support access only to the object being marshalled and not to the
>> stream (so I can not write xml comment before/after marshalling object).
>> Could this be extended, to have access to ContentHandler within marshall
>> listener?
>>
>> Regards,
>> Stevo.
>>
>> On Wed, Nov 24, 2010 at 11:47 AM, Stevo Slavić<[email protected]>  wrote:
>>
>>  Correction to my question, I ment marshalling and not unmarshalling.
>>>
>>> Regards,
>>> Stevo.
>>>
>>>
>>> On Wed, Nov 24, 2010 at 11:44 AM, Stevo Slavić<[email protected]>
>>>  wrote:
>>>
>>>  Hello Castor users,
>>>>
>>>> Does anyone know if there is support in Castor to produce XML comments
>>>> when unmarshalling an object? To be more specific, when unmarshalling a
>>>> collection, when a specific condition is met I'd like to have xml
>>>> comment
>>>> produced before element of a collection is unmarshalled. 3rd party
>>>> service
>>>> I'm integrating with expects these comments to treat elements after the
>>>> comments in a specific way. I know that service contract is insane and
>>>> broken, but I have to find a workaround. Maybe there's possibility to
>>>> add
>>>> listeners to unmarshalling events to add custom unmarshalling behavior
>>>> like
>>>> this?
>>>>
>>>> Regards,
>>>> Stevo.
>>>>
>>>>
>>>
>>>
>>

Reply via email to