Hola a tod@s...
Estoy reciendo estructuras tipo esto:
Código HTML:
Array
(
[ServicioEntregaResult] => Array
(
[ApplicationState] => Array
(
[OperacionExitosa] => 1
[Novedad] => -
)
[Dato] => 123456
)
)
Requiero que eso que recibo se vea como un xml, o poder construir un xml.
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
Este es el script de ejemplo que estoy utilizando
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
Cómo hago para que esa estructura, o el texto quede como un xml?

Alguna idea?
Gracias!!!