PHP5 simplexml

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi guys, I'm trying to output from an XML string and am having no luck. I'm  
using PHP5 here.

If I print_r the array I get all the results plus extra text, but am unable  
to extract the individual response. Any pointers appreciated.

Here's the code that shows the results...

  $get_all_value = $xmlrpc_resp->value();
  $albums_array = php_xmlrpc_decode($get_all_value);
 print $albums_array['string'];

Here's the result string that I want to break up ...

xmlrpcval Object
    [me] => Array
            [string] =>
    <photos page="1" pages="1" perpage="500" total="155">
        <photo id="114766115" owner="xxxxxx" secret="xxxxxx" server="50"  
title="Water Pump, Bushy Park" ispublic="1" isfriend="0" isfamily="0" />
        <photo id="114765757" owner="xxxxxx" secret="xxxxxx" server="36"  
title="Deer, Bushy Park" ispublic="1" isfriend="0" isfamily="0" />    </photos>


    [mytype] => 1
    [_php_class] =>
)Many thanks  

Re: PHP5 simplexml

Hi all, I didn't get any replies on this unfoprtunately, but thought I'd  
give a second go with an error from my apache log.

[Tue Mar 28 10:02:16 2006] [error] [client] PHP Warning:  
simplexml_load_string() expects parameter 1 to be string, object given in  
z:\xmlrpc.php on line 34\n

So, how do I convert from an object to a string?!

<crosses fingers>
</crosses fingers>
Quoted text here. Click to load it

Site Timeline