Hi everyone, I'm new to CakePHP and started using it in hopes of
developing a project assigned to me in a course at my university as
quickly as possible.
The project requires that I avoid the use of databases completely,
relying on XML files (or rather, file) to load, display, add, remove,
s
Hey there
I second what Ryan Schmidt says but if you disagree or the decision is out
of your hands, this may help you.
http://book.cakephp.org/view/380/XML
Perhaps this
http://book.cakephp.org/view/624/Xml-parsing
and if for some bizarre reason you need to generate xml from within the
On Dec 16, 2010, at 05:54, keymaster wrote:
> Our flash developer wants to create a totally flash front end to our
> cake app.
>
> He is asking us to change our view layer to render XML instead of
> HTML, for all views, including forms.
>
> The flash front end will build t
Our flash developer wants to create a totally flash front end to our
cake app.
He is asking us to change our view layer to render XML instead of
HTML, for all views, including forms.
The flash front end will build the forms based on the XML it receives,
then submit the form in the format cake
;AccessRequest' => array('AccessLicenseNumber' =>
$this->license, 'UserId' => $this->username, 'Password' => $this-
>password));
$rating = array('RatingServiceSelectionRequest' =>
array('Request'));
$this->set(compact(&
try not to go outside that
framework too much to bring other stuff in.
On Dec 3, 11:39 am, ryandesign wrote:
> PHP has several ways to generate XML already SimpleXML for
> example. Wouldn't using one of those methods be sufficient?
>
> On Dec 3, 9:34 am, DragonFlyEye wrote
PHP has several ways to generate XML already SimpleXML for
example. Wouldn't using one of those methods be sufficient?
On Dec 3, 9:34 am, DragonFlyEye wrote:
> I need to send SOAP requests to UPS for shipping info. As such, I need
> to create an XML "file" that can
Ok, I'm sure I'm just missing something remarkably obvious, so feel
free to hit me over the head. I'll thank you.
I need to send SOAP requests to UPS for shipping info. As such, I need
to create an XML "file" that can be sent to them, the results of which
being obviou
On Wed, Nov 3, 2010 at 2:11 AM, sipiatti wrote:
> did you debugged $modules?
> the message says it is not an object so does not have methods.
> something wrong there...
Yes, the HTTP protocol doesn't allow for passing class objects over the wire.
Check out the new CakePHP Questions site http://c
did you debugged $modules?
the message says it is not an object so does not have methods.
something wrong there...
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google G
On Tue, Nov 2, 2010 at 12:20 AM, mochaman wrote:
> Let me start by saying that I am very new to php and cakephp. I went
> through the blog tutorial (:-)) and now am facing a problem which I
> believe is something simple, but can't seem to get it to work. I have
> an xml file w
Let me start by saying that I am very new to php and cakephp. I went
through the blog tutorial (:-)) and now am facing a problem which I
believe is something simple, but can't seem to get it to work. I have
an xml file which I am reading into my view then upon selection of one
of the nodes,
Hey,
What I am trying to do is send a url request to multimaps which in
turn gives me a xml form which looks like:
- http://clients.multimap.com/API"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
clients.multimap.com/API http://clients
onfig/routes.php:
>
> > Router::mapResources('shows');
> > Router::parseExtensions();
>
> > My controller (just a stub) is as follows:
>
> > > class ShowsController extends AppController {
>
> > var $name = 'Shows
es.
>
> I've added the following to config/routes.php:
>
> Router::mapResources('shows');
> Router::parseExtensions();
>
> My controller (just a stub) is as follows:
>
> class ShowsController extends AppController {
>
> va
Hey guys,
I'm trying to get a REST app working using Cake and I've followed the
instructions in http://book.cakephp.org/view/1473/XML several times.
I've added the following to config/routes.php:
Router::mapResources('shows');
Router::parseExtensions(
Thanks, I think that's what I'm going to have to do, I've done this
already, but it's just a php script that I run off a cron job. Was
hoping their was some type of build in functionality to do this
natively with cakephp.
Thanks Everyone!
On Oct 15, 1:14 pm, Raisen wrote:
> You can use the Zlip
You can use the Zlip functions: http://php.net/manual/en/book.zlib.php
On Oct 15, 8:42 am, 5942marine wrote:
> I've been doing some reading and so far, haven't found a solid answer.
> My question lies around gzip and xml. Is it possible to create a xml
> file using cakephp
you could use exec() to create a gzip, then serve that
On Oct 15, 11:42 am, 5942marine wrote:
> I've been doing some reading and so far, haven't found a solid answer.
> My question lies around gzip and xml. Is it possible to create a xml
> file using cakephp that
I've been doing some reading and so far, haven't found a solid answer.
My question lies around gzip and xml. Is it possible to create a xml
file using cakephp that is compressed? like /sitemap.xml.gz
I have it working just fine if you hit /sitemap.xml, but I'd really
like that
Read through the RequestHandler area of the cookbook then head over to
parse extension part of the router section. Lastly take a look at the
XML helper to output your content into xml. You'll get a good head
start on all you'll need to do to accomplish this.
http://book.cakephp.org
the
> regular webbaddresses but redirect the output to an XML view instead
> of a HTML one.
>
> Where do I add this functionality the simplest way? Do I just make a
> check in beforeFilter if it's coming in from a mobile device or is
> there a better way?
>
> Thank you,
>
Hello,
I am creating a mobile application interface and I'd like to call the
regular webbaddresses but redirect the output to an XML view instead
of a HTML one.
Where do I add this functionality the simplest way? Do I just make a
check in beforeFilter if it's coming in from a mobile de
Hi,
This is the class I have.
class ThingController extends AppController{
public $helpers = array('Cache');
public $cacheAction = array('config' => 36000);
function config(){
// code here
}
}
It seems to work fine caching view files, b
Convert xml to arrays and use array datasource?
http://wiki.github.com/jrbasso/array_datasource/
On Sep 1, 12:07 pm, live-maron wrote:
> I want to read xml by cakePHP.
> Afrer read xml,I want paging with xml,because,xml has many items.
> Does cakePHP have function which is pagin
Hi there
I am creating a site with an XML file with all the site changables
like email, phone number, address etc. Currently these are prone to
change so I want to keep the simplicity of using XML.
Problem is I have to keep cutting and pasting the same bit of code in
all my view files well
I want to read xml by cakePHP.
Afrer read xml,I want paging with xml,because,xml has many items.
Does cakePHP have function which is paging for xml.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message
hi there..
i have an xml file which was generated by me from an array by cakephp
function xml->compose(true)
now how can i turn it back to array?
i tried to use, $array = Set::reverse(new Xml('myfle.xml'));
but the result just give me one index of ar
Hello!
While using the "built in" REST in version 1.3.2, I ran into an oddity
I hadn't seen before.
On my development XAMPP set up everything looks fine.
On my test server (Centos) all XML elements were shortened.
Has anyone else seen this?
Check out the new CakePHP
Hey guys,
i am developing under centos:
php-mysql-5.1.6-27.el5
php-xml-5.1.6-27.el5
php-common-5.1.6-27.el5
php-pdo-5.1.6-27.el5
php-xmlrpc-5.1.6-27.el5
libxml2-2.6.26-2.1.2.8
xml-common-0.6.3-18
xml-commons-1.3.02-0.b2.7jpp.10
php-xmlrpc-5.1.6-27.el5
And when i am trying to use the Helper Xml
You have to tell CakePHP to render as XML, for example by using the
requestHandler to set the respond type. See:
http://book.cakephp.org/view/1295/Responding-To-Requests
That should mean that CakePHP will use the default XML layout defined
in the /views/layouts/xml folder.
The above is my
Hi thanks for your advice.
I included
$this->layout='xml';
into my controller::index();
I place header() ?> into the index.ctp.
But it is still not rendered as xml. I am using firefox and chrome.
any more idea why? or does anybody has a sample cakephp project with
REST.
On
If I understand the XML helper correctly, then the result from the
serialize method is an XML structure. But this structure is without
the XML tag, so the browser will not see it as XML to be rendered.
Somewhere there should be an XML layout that are used with outputing
XML. In the layout should
Hi all,
I tried to follow this tutorial to do REST web services.
Below are my code.
CONFIG/ROUTES.PHP
Router::mapResources('recipes');
Router::parseExtensions('xml'); // it doesn't make a difference
whether i include 'xml' or not
MODEL
There are many ways to convert the same array into XML. How will the
function know which you want? How will it know when you want to add a
value as an attribute or as a textnode?
On Jun 15, 10:34 pm, Kyle Decot wrote:
> I need to take an array that I have and turn it into something similar
&
I need to take an array that I have and turn it into something similar
to:
sdfsdfkdsjfdsfljdsflkjdsfkldsjf
Is it possible to do this without knowing the exact structure of the
array I'm providing. I want to be able to pass it pretty much anything
as this will be used in a bunch of metho
Thanks for you reply, I am aware that this could be a workaround. But
I hoped that there was another way to fix this. I think more people
want this.
On Jun 14, 4:41 pm, calvin wrote:
> I don't think I've ever used the XML helper, but this seems like a
> pretty simple array mani
I don't think I've ever used the XML helper, but this seems like a
pretty simple array manipulation problem:
foreach ($data['news']['news_images'] as $newsImage) {
$data['news'][] = $newsImage;
}
unset($data['news']['news_images'
Hi fellow Cake bakers!
I have a question about the XML helper I have a model which has a
hasMany relationship. (News hasMany NewsImages). But when I use the
serialize function to render the data to XML I get a result I don't
really like. I would like cake to wrap a xml-node around the child
Well you have wrote:
> Hi
> I would use XML in my application.
> I define my default layout in xml like :
>
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
>
Hi
I would use XML in my application.
I define my default layout in xml like :
");
?>
Now when I call a page like : /{controller}/{action}.xml I get this
error :
Error interpretation XML: non well-formed
Line number 2, column 3:
---^
Can someone help me about this?
Check out the new
Instead of calling $xml->createElement try doing
$node = $xml->createNode(...);
$xml->append($node);
inside of your for loop.
On Thu, 2010-04-22 at 07:21 -0700, Jeremy Burns wrote:
> I am trying to produce an XML file ($results is an array of data):
>
>
>
m
>
>
> On 22 Apr 2010, at 15:21, Jeremy Burns wrote:
>
>> I am trying to produce an XML file ($results is an array of data):
>>
>>
>> App::import('Xml');
>>
>> $xml = new Xml();
>>
>> $xml->createEleme
Any takers please? Do I need to add an option to my createElement statement?
What am I doing wrong?
Jeremy Burns
jeremybu...@me.com
On 22 Apr 2010, at 15:21, Jeremy Burns wrote:
> I am trying to produce an XML file ($results is an array of data):
>
>
> App:
I am trying to produce an XML file ($results is an array of data):
App::import('Xml');
$xml = new Xml();
$xml->createElement('records', null, array(), 'namespace');
$xml->addNamespace('namespace', '
Any takers please?
Jeremy Burns
jeremybu...@me.com
On 15 Apr 2010, at 16:45, Jeremy Burns wrote:
> I have a controller function that calls a model function that
> generates a well formed array. I want to convert the array to XML and
> submit it to a web service. The array is in the same
I have a controller function that calls a model function that
generates a well formed array. I want to convert the array to XML and
submit it to a web service. The array is in the same shape as the
example in the guide:
Array
(
[Baker] => Array
(
[0] =>
Have a look at the base param of your flash object
or
which will set the base to an absolute path to your cake webroot
depending on where your images are (and your xml too)
I assume
webroot/
xml/
img/
swf/
so you load xml/gallery.xml with img/gallery01/*.jpg, img/gallery02/*.jpg
HI,
I have a workingswf gallery file that dynamically displays images read
from an xml file. When I put all the gallery stuff in the cake
environment, it doesn't work.
The flash swf is detected, but it does not display images.
How can I adjust the paths in the action script and in the xml
Hi,
(Cake 1.2)
I'm trying to implement an XML view for my controller, using the XML
helper, however whenever I invoke something like:
pr($xml->serialize($data));
I get a message: "Undefined variable: xml"
I've tried including the helper in my controller and also trie
There is no serialize() method in the Xml class. You want to use the
XmlHelper. In that case, add it to your $helpers array and there's no
need to import().
http://api.cakephp.org/class/xml
http://api.cakephp.org/class/xml-helper
On Mar 23, 8:05 am, Carachi wrote:
> Hello, I would to
On Mar 10, 4:05 pm, cartosys wrote:
> code:
>
> $link = 'http://some.xml.feed.xml';
> $parsed_xml = new XML($link);
> $parsed_xml = Set::reverse($parsed_xml);
>
> The XML feed at hand is one that took over a minute to load via
> browser
dont know exact answer...but maybe i can help you or point you to some good way
if i understand...you want to parse some xml from web -> mean,
download xml and parse it ... so, maybe u should try to "avoid" using
cakephp defined functions (create some component to download and pars
code:
$link = 'http://some.xml.feed.xml';
$parsed_xml = new XML($link);
$parsed_xml = Set::reverse($parsed_xml);
The XML feed at hand is one that took over a minute to load via
browser. cakephp's XML returned an empty array after Set::reverse,
and a
XML is some stock data i need to pull back on a daily basis. I will store
the data in a table once i've got it, but i want to be able to deal with the
XML data as a cake model before that.
On Wed, Feb 17, 2010 at 3:10 AM, John Andersen wrote:
> What is the content of the XML data? Wha
What is the content of the XML data? What is the purpose of the data?
If you already have a structure in the database that fits the XML
data, what actually is your issue?
Do I understand your correctly or wrongly :)
John
On Feb 16, 1:53 pm, Greg wrote:
> Hi,
>
> I'm writi
Hi,
I'm writing a site that needs to digest external XML data from a web
service. The data then needs to be associated to reference tables in
the database.
I figure i need to $useTable = false to make the new XML model not
point at a database, and $_schema to define the model's data
Well, I've working on XML with Cake recently, and I choose to convert
the XML to array and then work on the arrays, before converting the
array back to an XML
It works well for me !
On Feb 6, 9:56 pm, misterjinx wrote:
> Hello,
>
> I'm trying to figure out how to modify th
Hello,
I'm trying to figure out how to modify the content of an xml document
using the xml core library, but i don't succeed at appending the newly
created element at the root element. First of all, I have the
following structure of my xml file:
It is easy to return xml data form cakephp applicaiton.
1. You have to configure app/config.core.php file
2. set debug mode to 0 ( zero).
ex. Configure::write('debug', 0);
3. Then assign your XML data in a variable
4. Finally echo your variable
5. If you set debug mode to 2, then
correct mimetype on them. I've tried:
>
> > lass AppController extends Controller {
> > var $components = array('RequestHandler');
> > function beforeFilter( ) {
> > $this->RequestHandler->setContent('xhtml',
> >
t; can ;) ), so I want correct mimetype on them. I've tried:
>
> lass AppController extends Controller {
> var $components = array('RequestHandler');
> function beforeFilter( ) {
> $this->RequestHandler->setContent('xhtml',
&
>RequestHandler->setContent('xhtml',
'application/xhtml+xml');
}
}
but Live HTTP Headers reports the content is returned as an text/html
anyway. I kinda can't find other options. Is there something in Cake I
don't know, or is it a bug in my Apache config? (in apa
I wrote a quick script for you. (I do this for a living. Also, I like
crosswords.)
# Script WordOfTheDay.txt
var str rss, title, link, description
cat "http://wordsmith.org/awad/rss1.xml"; > $rss
while ( { sen -r -c "^&^" $rss } > 0 )
do
stex -r -c &q
Hi guys,
>
> > I am looking at making use of certain RSS feeds, XML files from a site
> > to display certain content on their.
> > I have tried with simplepie but no luck.
>
> > Is there anybody that could tell me if there are any solutions to help
> > you too d
th my (limited) simplepie
knowlege.
On Dec 14, 10:38 am, appel268576 wrote:
> Hi guys,
>
> I am looking at making use of certain RSS feeds, XML files from a site
> to display certain content on their.
> I have tried with simplepie but no luck.
>
> Is there anybody that could tell me
Hi guys,
I am looking at making use of certain RSS feeds, XML files from a site
to display certain content on their.
I have tried with simplepie but no luck.
Is there anybody that could tell me if there are any solutions to help
you too display RSS in your controllers.?
Controller
dont know
Hi,
I need to use XML and JSON outputs for an API that I program for a
project that has a web backend and multiple mobile clients.
The Javascript helper with Cake works just fine, but the XML Helper is
full of bugs. I posted the initial problem here:
http://groups.google.com/group/cake-php
text/plain');
before your ajax call to make CakePHP stop thinking that it's XML type
of post.
Hope this helps.
palivoda.eu
On 7 ноя, 00:04, "Dave" wrote:
> I get this error only in Google Chrome
>
> I simply click a link and that sends an ajax request to render an el
Before anyone attempts to answer this, what is your understanding of
the error and its cause?
The error is in a CakePHP class, so start there.
On Nov 7, 6:04 am, "Dave" wrote:
> I get this error only in Google Chrome
>
> I simply click a link and that sends an ajax request to render an element
Hi guys. I'm new to cakephp. Is it possible for cakephp to handle
stored procedures and XML-RPC?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send em
Hey all,
Does anyone does the xml serialize uses attributes as a default rather
than tags/elements? It would seem like it to me that XML data should
use tags rather than elements.
Take for example the following array (off the cakephp website):
Array
(
[Baker] => Ar
I recently upgraded the version of CakePHP in a project I work on to
version 1.2.5. Since then, it seems that the XML class is unable to
parse some XML strings correctly.
Here's the code:
$tmp_xml =& new XML($XMLFilename);
$tmp_xml = $tmp_xml->toArray(false);
The contents of
0 in the
> controller function... :(
>
> Anyway you recomendation open my eyes... and I found that it was
> looking for "view/layout/xml/ajax.ctp" and not the default view "view/
> layout/xml/default.ctp" ... This could be because I did the call with
> Java
o 0 in the
controller function... :(
Anyway you recomendation open my eyes... and I found that it was
looking for "view/layout/xml/ajax.ctp" and not the default view "view/
layout/xml/default.ctp" ... This could be because I did the call with
Javascript? ... so I try with ajax.ctp an
page...
>
> for more details
> http://mysite.com/mycontroller/myfunction/1 return an XML its works
> fine
>
> data
>
>
> but if I call it with javascript using
> http://mysite.com/mycontroller/myfunction/1
> or simply /mycontroller/myfunction/1 i get a not page found
&
XML its works
fine
data
but if I call it with javascript using
http://mysite.com/mycontroller/myfunction/1
or simply /mycontroller/myfunction/1 i get a not page found
If I change the code the URL change something like this but result is
the same http://mysite.com/mycontroller/myfunction.xml
out web service
>
> So after read this I work my own test... I created controller function
> like in the example with all the data I need... also the xml view
> under the same controller view folder ... so if I point my browser to
> "mycontroller/myfunction/1" .. I get t
like in the example with all the data I need... also the xml view
under the same controller view folder ... so if I point my browser to
"mycontroller/myfunction/1" .. I get the render of a nice XML
file ...so everything if ok here but when I set the same path in
my javascript file (wh
Hi,
since updating to cake 1.2. I have been having problems with the xml
helper. This ticket (https://trac.cakephp.org/ticket/6538) seems to
fix a bug, but I still have the following problem. If I have a data
structure like this:
Array
(
[result] => Ar
>
> > > You can try something like this in your shell
>
> > >
> > > ...
> > > ..
>
> > > $page = 1;
>
> > > while(1) {
>
> > > $records = $this->findAll("conditions' => array(bla bla bla),
> > >
x27; => array(bla bla bla),
> > 'fields' => 'Model.*' ,'limit' => 50, 'page' => $page);
>
> > if($records) {
> > // Write Your XML in a File.
> > }else{
> > break;
> >
am, Jaydeep Dave wrote:
>
> > > You can try something like this in your shell
>
> > >
> > > ...
> > > ..
>
> > > $page = 1;
>
> > > while(1) {
>
> > > $records = $this->findAll("conditions
ry something like this in your shell
>
> >
> > ...
> > ..
>
> > $page = 1;
>
> > while(1) {
>
> > $records = $this->findAll("conditions' => array(bla bla bla),
> > 'fields' => '
; by any means.
>
> On Jul 26, 1:55 am, JamesF wrote:
>
> > MY PROBLEM:
> > i am running into a wall with this one. basically i have a large xml
> > file that i am rendering using XmlHelper. We are talking about a
> > 25-50mb file. This is basically a product dat
wrote:
> > MY PROBLEM:
> > i am running into a wall with this one. basically i have a large xml
> > file that i am rendering using XmlHelper. We are talking about a
> > 25-50mb file. This is basically a product data feed. I have tried
> > quite a few methods to over
i took the drastic step of increasing my php memory limit to avoid
dealing with this right now but i dont think its a long term solution
by any means.
On Jul 26, 1:55 am, JamesF wrote:
> MY PROBLEM:
> i am running into a wall with this one. basically i have a large xml
> file
ell
>
>
> ...
> ..
>
> $page = 1;
>
> while(1) {
>
> $records = $this->findAll("conditions' => array(bla bla bla),
> 'fields' => 'Model.*' ,'limit' => 50, 'page' => $page);
>
>
:
> $mysqli = ConnectionManager::getDataSource('default');
> $mysqli->disconnect();
> $mysqli->connect();
>
> debug($mysqli->connected);
> debug($mysqli->connection);
>
> On Jul 26, 7:55 am, JamesF wrote:
>
> > MY PROBLEM:
> > i am running i
You can try something like this in your shell
findAll("conditions' => array(bla bla bla),
'fields' => 'Model.*' ,'limit' => 50, 'page' => $page);
if($records) {
// Write Your XML in a File.
}else
Try with :
$mysqli = ConnectionManager::getDataSource('default');
$mysqli->disconnect();
$mysqli->connect();
debug($mysqli->connected);
debug($mysqli->connection);
On Jul 26, 7:55 am, JamesF wrote:
> MY PROBLEM:
> i am running into a wall with this one. basical
Everything inside a CDATA is ignored by the XML parser.
A CDATA part starts with "":
On Jul 23, 5:09 pm, mona wrote:
> can anybody tell me how to cdata tag for attribute value in cakephp
--~--~-~--~~~---~--~~
You received this message be
can anybody tell me how to cdata tag for attribute value in cakephp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from t
Ty Alexandru for your help.I will use a little different block of code as i
tested it and it works fine.Beow is my code.where i take each geoname's
fields and save them in my db.
for ( $i = 1; $i <= 4; $i += 1) {
/** total results**/
$root=$xml->children[0]->chi
On 07/14/2009 04:29 PM, Paulos23 wrote:
>
> How i can take these data from the array[] and print them like this
> for example?
> name:Barcelona
> lat:...
> lng...
>
Given $i is the name of your array.
foreach($i['Geoname'] as $parent){
foreach($parent as $key => $child){
Hi peeps,
I have spent much time in finding the proper solution for my
problem.To be more specific i am parsing an xml document from an
external site(using httpSocket) which contains some data.I have
managed to parse it and when i do pr($parsed_xml) or debug
($parsed_xml) i get an array which
In addition to what Pietro suggested I doing the following (the same can be
adapted for json rss)
parseExtensions for xml in router - Router::parseExtensions() see screen 25
of link of first link
check if requested format is xml
respondAs Xml (ensure that debug is off; set layout xml you can use
why don't you use an xml layout, a view and a controller, and xmlhelper?
as for simple html...
--
pietro
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, sen
can anybody tell me how to generate xml in cakephp and export data
from database in xml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@google
)
>
> [2] => Array
> (...
>
>
>
> 2009/7/8 Robert P
>
>
>> Um, have you tried checking the contents of $parsed_xml?
>>
>>debug($parsed_xml);
>>
>> On Jul 8, 6:33 p
101 - 200 of 440 matches
Mail list logo