Estoy reciendo estructuras tipo esto:
Código HTML:
Array ( [ServicioEntregaResult] => Array ( [ApplicationState] => Array ( [OperacionExitosa] => 1 [Novedad] => - ) [Dato] => 123456 ) )
He estado leyendo y encuentro módulos en php como el de simplexml_load_string, pero este me arroja de hecho un resultado como el que recibo.
Código HTML:
SimpleXMLElement Object ( [0] => Text1 & XML entities ) SimpleXMLElement Object ( ) Text1 & XML entitiesText2 & raw data
Código PHP:
$xml = simplexml_load_string('<foo>Text1 & XML entities</foo>');
print_r($xml);
/*
SimpleXMLElement Object
(
[0] => Text1 & XML entities
)
*/
$xml2 = simplexml_load_string('<foo><![CDATA[Text2 & raw data]]></foo>');
print_r($xml2);
/*
SimpleXMLElement Object
(
)
*/
// Where's my CDATA?
// Let's try explicit casts
print_r( (string)$xml );
print_r( (string)$xml2 );
/*
Text1 & XML entities
Text2 & raw data
*/
// Much better
![Silbar](http://static.forosdelweb.com/fdwtheme/images/smilies/silbar.gif)
Gracias!!!