On Apr 21, 2008, at 5:28 PM, David Holt wrote:

Hi all,

I have successfully parsed an XML file with the Apache Digester (thanks to Chuck's suggestion) and created EOs using the default rules.

I end up with an array of EOs each of which has several to-many relationships to other created EOs. The xml seems to all be "digested" at once when the file is parsed and I am not sure where to intervene to add an EO to the editing context. Can anyone help me with this?

Offhand, I don't know. I looked at our code using Digester (code which I was not at all involved in, my story, and I am sticking to it), we imported them into intermediate (non-EO) classes and then fetched / created EOs (as appropriate for update / create). We then copied the needed values from the intermediate classes. I think that was necessary as the XML represented EOs getting inserted into an existing, complex graph of objects. Your case is probably simpler, but I don't have a simple solution at hand.

Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to