Try use the var_dump() or debug().I had the same problem and i am using the
debug().To be more specific here is some code which might help you:
$results = ....
$parsed_xml =& new XML($results);
$parsed_xml = Set::reverse($parsed_xml);
debug($results); (or var_dump($results))
2009/6/11 robert123 <[email protected]>
>
> i am using the below codes, took from the bakery, straight
>
> App::import('Xml');
>
> // your XML file's location
> $file = "my_xml_file.xml";
>
> // now parse it
> $parsed_xml =& new XML($file);
> $parsed_xml = Set::reverse($parsed_xml); // this is what i call
> magic
>
> // see the returned array
> print_r($parsed_xml);
>
> the my_xml_file.xml have the data below
>
> <order id="3525314" ></order><order id="3525317" ></order>
>
> it has two order data, the my_xml_file.xml was generated from the
> database using $xml->serialize($data);
>
> but whenever the code above is executed I only get
> Array ( [Order] => Array ( [id] => 3525314 ) )
>
> that is it is only reads the first order and never the second order,
> how can i make it to read the whole xml data into an array, thank you
>
>
>
>
>
> http://www.generics.ws
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---