Thanks grant.

What I've done so far is created a controller to parse the xml, it uses
xpath to get the nodes/attributes that I need (I don't need the whole of
the xml).

No what I want to do is populate an instance of a model "asset" with the
contents of the nodes I captured, I see that the model is an associative
array so do I have to manually populate an associate array to be a copy
of my db table.

Any links to anything that does this ?  Basically it would be like
having a from on screen, filling it in and then creating a new record I
guess , just in my case the xml is used to pre-populate the form.

 (I have a java applet that ftp's some QuickTime files to the server
with an xml file and my cake/php app parses the xml and pre-populates a
form).

My concern here is I use cake where I can instead of just coding it
myself and slotting it into cake and not using cake's "abilities".

Cheers,
Grant

-----Original Message-----
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Grant Cox
Sent: Wednesday, October 25, 2006 6:00 PM
To: Cake PHP
Subject: Re: Application Architecture


That (1) is pretty much exactly what I would do.  Make a component that
parses your XML into an associative array.  Get your controller action
to pass the uploaded XML to this component, then use the array data to
create and save instances of your model(s).

I agree a lot of heavy lifting can be done in a model, but I wouldn't
put XML parsing in there as it is a generic action.


On Oct 26, 3:37 am, "realien" <[EMAIL PROTECTED]> wrote:
> 1) I parse an XML file from a dv camera and need to insert what I get 
> into my database, I will have models for the data, but do I create my 
> xml parse class in my own "package" and have my controller call it  
> and map it to my model somehow before inserting it into my database?  
> Not quite sure where it should fit.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to