Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/09/2011, 15:24
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Como usar simplexml

Código PHP:
Ver original
  1. $contenido = <<<XML
  2. <DUA_RESPUESTA>
  3. <NUMERO_ORDEN>3161500096</NUMERO_ORDEN>
  4. <FECHA_TRANSMISION>16/09/2011 14:53:12 </FECHA_TRANSMISION>
  5. <RESPUESTA_VALIDACION>ACEPTADA</RESPUESTA_VALIDACION>
  6. <NUMERO_DUA>GTPBRPB1102737600 011</NUMERO_DUA>
  7. <NUMERO_FORMULARIO>4286602</NUMERO_FORMULARIO>
  8. <FIRMA_ELECTRONICA>FIRMA_PRUEBA</FIRMA_ELECTRONICA>
  9. </DUA_RESPUESTA>
  10. XML;
  11.  
  12. $xml = new SimpleXMLElement($contenido);
  13. echo $xml->NUMERO_ORDEN;

Lee este aporte muy bueno para aprender:
http://www.forosdelweb.com/f18/aport...ml-dom-792348/
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP