You can tell JiBX in the binding definition to use a method of your own to
do the marshalling.

The method must be something like this:
    public static String <methodName>(Object obj)

and you tell it in the binding definition like this :

<value name="data" field="data"
                serializer="<some class name that contains your marshalling
method>.<methodName as above, without the parentheses>"

Be careful to specify the complete class name, packages included.
You do exactly the same if you want to use a custom un-marshaller.

Hope this helps,
Angel
O:]

----- Original Message ----- 
From: "Tim Sawyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 06, 2004 1:25 PM
Subject: [jibx-users] Manual Marshalling


> Hi,
>
> I would like to manually implement the marshal method in a class, to take
the
> tag name and contents from the class I am on.
>
> So if I have two attributes, this.tagname which contains TAGNAME and
> this.tagcontents which contains CONTENTS I would like to output
>
> <TAGNAME>CONTENTS</TAGNAME>
>
> I'm not sure how to deal with the passed in IMarhsllingContext to get this
to
> work.
>
> Is this possible?
>
> Cheers,
>
> Tim.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> _______________________________________________
> jibx-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to