Or perhaps it could look like this to update a whole document that has a bunch of objects:
Transaction tx = Persistence.beginTransaction("doc.xml");
tx.update(obj1);
tx.update(obj2);
tx.update(obj3);
tx.delete(obj4);
tx.save();
tx.close();
Needs to be very fleshed out, but we shall see how it goes!
Overall still a good idea (at least transaction support), but this still needs to be fleshed out a lot. The example above will not work anymore, to be sure..
Might need to approach it from a more generic perspective in order for scalable updates. Something like this to update an object:
Or perhaps it could look like this to update a whole document that has a bunch of objects: Transaction tx = Persistence.beginTransaction("doc.xml"); tx.update(obj1); tx.update(obj2); tx.update(obj3); tx.delete(obj4); tx.save(); tx.close();
Needs to be very fleshed out, but we shall see how it goes!