When you said "recursive structures" I interpreted that to mean
structures where a class references other instances of the same class
(or reference other classes that reference the same class). I didn't
realize you meant actual circular references in your data objects.
XML has no way to handle circular references directly. You need to make
sure each instance is serialized out once and only once on your own.
What I'd suggest is that whatever contains the Customer instances you're
working with does a serialization that includes all the customers being
used - basically walk the whole structure and collect a HashSet of all
customers, if you don't have a better way of eliminating duplicates,
then serialize out the resulting set. Each customer instance can then
use an IDREF link for the customer it references.
- Dennis
Kr wrote:
Hi Dennis,
Recursive structure is the actual subject of my original posting. If
you see I have below class structure :
Customer.java
-----------------------
public class Customer {
Customer customer = null;
public void setCustomer(Customer cust) {
this.customer = cust;
}
public Customer getCustomer() {
return this.customer;
}
}
Now can you please tell me how to write binding.xml. How to handle
recursive structures like this with JiBX. Please suggest ?
Thank You.
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users