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
-~----------~----~----~----~------~----~------~--~---

Reply via email to