Yes, it looks like you are correct. I haven't used Custom Serializers, but the explanation you gave is correct. You are trying to create XML elements with custom names, not serialize custom content as the values for the elements.
-Ian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tammy Dugan Sent: Friday, June 15, 2007 10:59 AM To: JiBX users Subject: Re: [jibx-users] variable element names Thanks for the quick response. Just to clarify, the reason I should use a custom marshaller instead of a custom serializer in this situation is that I need to create extra xml tags. The custom serializer is just meant for the content of a tag and doesn't support making additional tags. Is this correct? Thanks, Tammy Dees, Ian (GE Healthcare) wrote: > Tammy, > > I ran into the exact same issue. The way I worked around it is to use a > custom marshaller for the object. > > JiBX is meant to be used for one Object to one Element mappings, and > technically if you are trying to deviate from that then you should be > using another marshalling framework. That being said, if almost all of > your objects have a one-to-one mapping with an element name (except for > a few), then a custom marshaller would make sense. > > For more info, read > http://jibx.sourceforge.net/tutorial/binding-custom.html > > -Ian > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tammy > Dugan > Sent: Friday, June 15, 2007 9:55 AM > To: jibx-users@lists.sourceforge.net > Subject: [jibx-users] variable element names > > I have objects that represent logical relationships that can produce > variable element names in a jibx binding. For example, I have an object > called QueryComparisonSet that can produce elements with values like > "and","or", or "not". The element name is actually stored in a field in > the object. It doesn't look like there is a way to assign an element > name from a field. I am assuming I need to write a custom serializer for > > this. I am very new to jibx so can you give me some idea of what the > custom serializer might look like in this case. > > Thanks, > > Tammy > > -- Tammy Dugan Computer Programmer Regenstrief Institute, Inc. Medical Informatics Health Information and Translational Sciences (HITS) Building 410 West 10th Street, Suite 2000 Indianapolis, IN 46202 Main: 317.423.5500 Fax: 317.423.5695 IU campus mail address: HS, 2000 (317) 423 - 5541 Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose. If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other than the intended recipient is strictly prohibited. ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users