I've encountered this before.
If you are going to use:
<mapping name="findPerson" class="com.acm.Person">
then of course, you can't use the same class twice with different mappings
in JiBX.
<mapping name="editPerson" class="com.acm.Person"> - won't work.
I finally had to create two classes that merely extend the base class
public class FindPerson extends Person {}
and map to those. You can still refer to an instance of Person in your
code, of course.
Regards,
Brian Gardner
mule1 <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
11/17/2007 11:17 AM
Please respond to JiBX users <jibx-users@lists.sourceforge.net>
From
mule1 <[EMAIL PROTECTED]>
To
jibx-users@lists.sourceforge.net
cc
Subject
[jibx-users] how to map different xml element to same class
Hello,
I have two different xml:
e.g:
first xml:
<findPerson>
<name>cmpDescription</name>
<address>A</address>
</findPerson>
second xml:
<editPerson>
<name>cmpDescription</name>
<address>A</address>
</editPerson>
In my binding.xml, I want to map both findPerson and editPerson element to
the same class com.acm.Person
Is this possible? How can I accomplish this?
thanks.
--
View this message in context:
http://www.nabble.com/how-to-map-different-xml-element-to-same-class-tf4737091.html#a13546647
Sent from the jibx-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users