Foros del Web » Creando para Internet » HTML »

Ayuda parsear XML guardado en una variable.

Estas en el tema de Ayuda parsear XML guardado en una variable. en el foro de HTML en Foros del Web. Buenas Estimados: Hace poco me registre en el foro pero lo visito hace mucho. Les comento sobre un drama que tengo con un XML por ...
  #1 (permalink)  
Antiguo 05/05/2009, 08:20
 
Fecha de Ingreso: mayo-2009
Mensajes: 1
Antigüedad: 14 años, 11 meses
Puntos: 0
De acuerdo Ayuda parsear XML guardado en una variable.

Buenas Estimados:

Hace poco me registre en el foro pero lo visito hace mucho.
Les comento sobre un drama que tengo con un XML por si me pueden ayudar.

Necesito parsearlo para rescatar los datos que estan entre las etiquetas, el XML es el sgte...

Código:
  <?xml version="1.0" encoding="UTF-8" ?> 
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="h" xmlns:xsd="" xmlns="">
- <SOAP-ENV:Body>
- <RetrieveIncidentListResponse message="Éxito" returnCode="0" schemaRevisionDate="2009-04-29" schemaRevisionLevel="6" status="SUCCESS" xmlns="" xmlns:cmn="" xsi:schemaLocation="">
- <model query="number="INC28872"">
- <keys>
  <IncidentID type="String">INC28872</IncidentID> 
  </keys>
- <instance recordid="INC28872 - UMMT2 - UNIMAR LAS TORRES - BASE STATION OPERATION DEGRADED" uniquequery="number="INC28414872"">
  <IncidentID type="String">INC28747872</IncidentID> 
  <Category mandatory="true" type="String">SERVICIO DE VOZ</Category> 
  <OpenTime type="DateTime">2009-02-11T19:12:47+00:00</OpenTime> 
  <OpenedBy type="String">TesMIdsfP</OpenedBy> 
  <Severity type="String">MED</Severity> 
  <UpdatedTime type="DateTime">2009-03-31T00:33:40+00:00</UpdatedTime> 
  <PrimaryAssignmentGroup type="String">OPREDACC</PrimaryAssignmentGroup> 
  <cause.code type="String">Umbral OSS Sobrepasado</cause.code> 
  <ConfigurationItem type="String">110517</ConfigurationItem> 
  <Location type="String">FIDEL</Location> 
- <IncidentDescription type="Array">
  <IncidentDescription type="String">BASE STATION OPERATION DEGRADED #S#10457651 *** MR-NWI3 UTORFU13 RNC MMT2 PLMN-PLMN/RNC-20/WBTS-13583 BASE STATION OPERATION DEGRADED</IncidentDescription> 
  </IncidentDescription>
  <DowntimeStart type="DateTime">2009-02-09T16:19:38+00:00</DowntimeStart> 
  <AssigneeName type="String">PLEAL</AssigneeName> 
  <Contact type="String">TeMIP</Contact> 
- <JournalUpdates type="Array">
  <JournalUpdates type="String">03/03/2009 12:56:59 Chile/Santiago (AHAHN):</JournalUpdates> 
  <JournalUpdates type="String">11/02/2009 16:14:30 Chile/Santiago (VCONTRERAS):</JournalUpdates> 
  <JournalUpdates type="String">This Incident is created by "JSR91 Adaptor For OVSC"</JournalUpdates> 
  </JournalUpdates>
  <ContactLastName type="String">TeMIP</ContactLastName> 
  <ContactFirstName type="String">TeMIP</ContactFirstName> 
  <Company type="String">TMC</Company> 
  <BriefDescription type="String">UMMT2 - UNIMAR LAS TORRES - BASE STATION OPERATION DEGRADED</BriefDescription> 
  <TicketOwner type="String">VCONTRERAS</TicketOwner> 
  <UpdatedBy type="String">VPEREZ</UpdatedBy> 
  <IMTicketStatus type="String">Work in progress</IMTicketStatus> 
  <Subcategory type="String">UMTS NOKIA</Subcategory> 
  <ProductType type="String">NODO B</ProductType> 
  <ProblemType type="String">7651 BASE STATION OPERATION DEGRADED</ProblemType> 
  <send.sms type="Boolean">false</send.sms> 
  <TmvNe type="String">110517</TmvNe> 
  </instance>
  </model>
  </RetrieveIncidentListResponse>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
Lo estoy rescatando Así:

Código:
$postResult= " EL XML "
$xml = simplexml_load_string($postResult);
print $xml->RetrieveIncidentListResponse;
Me lanza este error...

Código:
Fatal error: Call to undefined function: simplexml_load_string() in /var/www/html/SC/RetrieveListIncidents.php on line 23
No soy muy entendido en XML. Ojala me puedan Ayudar...

Saludos. DEV_JNOX!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:33.