Jump to content

Recommended Posts

I made this script which extracts data from a batch of files, and I'm basically just loading the extracted data into a big multidimensional array. Only issue now is I don't know what to do with the array. I don't feel like making new database tables for the data so instead I converted the array into an XML file, usually I would just use a .xsl file to output the XML file as HTML but I don't know how to do that with CakePHP. The XML file generated by CakePHP is big and ugly like the array:

cfbeba95fff24fb054ae029362235468.png

 

but its so easy to convert arrays into XML with CakePHP, I wanna make use of this feature. What should I do with the XML file? I've seen mention of "XML views" and JSON views but I haven't got my head around what they are yet. I suppose if there was an easy way to convert this XML or array into a database table structure, so it'll automatically create the table and load the data into it, that would be fairly useful. For now though, I need to be able to display this data in a human friendly format, cuz other people need to use this tool. Any tips?

I haven't tried yet actually, I haven't even figured out how to view the XML files through the cake routing system. I could add a new rule to routes.php but I'm thinking theres probably already a built in way to style and view XML files.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.