Thank you Ben,
I will try it.

Date: Tue, 16 Mar 2010 10:55:54 +0000
From: [email protected]
To: [email protected]
Subject: Re: [jibx-users] How to marshall a java object to an XML annotation



















You could use a custom marshalller for that element:

http://jibx.sourceforge.net/binding/tutorial/binding-custom.html#figure21

 

and use marshallingContext.getXmlWriter().writeComment()

 

Cheers,

Ben

 

 





From: taha triki [mailto:[email protected]] 

Sent: 16 March 2010 10:49

To: [email protected]

Subject: [jibx-users] How to marshall a java object to an XML annotation





 

Hello everyone,

if anyone know how to marshall an object to an XML annotation using JIBX, and
not writing directly XML with the XMLWriter per example : 



---- The class annotation



Class Annotation {

private String annotation;

public String toString(){

return annotation;

}



}



---- Marshall the object



Annotation a = new Annotation();

a.setAnnotation("My annotation");

marshallingContext.marshalDocument(a);



----- the xml result



....



<!-- My annotation -->



...



---- Thank you !







Hotmail
: une messagerie fiable avec une protection anti-spam performante Inscrivez-vous

 

                                          
_________________________________________________________________
Hotmail : une messagerie fiable avec la protection anti-spam performante de 
Microsoft
https://signup.live.com/signup.aspx?id=60969
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to