Foros del Web » Programando para Internet » PHP » Frameworks y PHP orientado a objetos »

Ayuda con SimpleXML

Estas en el tema de Ayuda con SimpleXML en el foro de Frameworks y PHP orientado a objetos en Foros del Web. Hola Colegas Estoy enfrascado en un tema que me ha tomado el dia y casi no encuentro la respuesta;;; Tengo que leer el siguiente fichero ...
  #1 (permalink)  
Antiguo 22/05/2008, 11:53
 
Fecha de Ingreso: mayo-2008
Mensajes: 1
Antigüedad: 16 años
Puntos: 0
Ayuda con SimpleXML

Hola Colegas

Estoy enfrascado en un tema que me ha tomado el dia y casi no encuentro la respuesta;;;

Tengo que leer el siguiente fichero xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0"
xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
xmlns:ots="http://www.onthesnow.com/ots_rss_namespace/"
>
<channel>
<title>Australia Ski &#x26; Snow Report | OnTheSnow.com</title>
<link>http://www.onthesnow.com/AU-AU/skireport.html?XE_AFF=rss</link>
<description>Includes the Australia ski report and weather reports for all ski resorts in Australia. OnTheSnow is primary source of all Australia snow reports on the web.</description>
<language>en-us</language>
<copyright>Copyright 2007, OntheSnow.com</copyright>
<item>
<title>Charlotte Pass</title>
<description>Closed / Past 48 Hours: 0&#x22; / Primary: N/A / Base Depth: 0&#x22;</description>
<guid isPermaLink="true">http://www.onthesnow.com/AU-AU/743/skireport.html</guid>
<pubDate>Fri, 28 Sep 2007 14:37:20 -0400</pubDate>
<ots:open_staus>Closed</ots:open_staus>
<ots:resort_id>743</ots:resort_id>
<ots:base_depth>0</ots:base_depth>
<ots:snowfall_48hr>0</ots:snowfall_48hr>
<ots:region_name>Australia</ots:region_name>
<ots:surface_condition>N/A</ots:surface_condition>
<ots:base_depth_metric>inches</ots:base_depth_metric>
<ots:snowfall_48hr_metric>inches</ots:snowfall_48hr_metric>
<ots:resort_rss_link>http://www.onthesnow.com/AU-AU/743/snow.rss</ots:resort_rss_link>
</item>

Mi problema esta al leer los namespace (ots:...>

Necesito leer todos los namespace....

alguien me puede dar una ayuda?

sa
  #2 (permalink)  
Antiguo 22/05/2008, 12:37
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Ayuda con SimpleXML

Hola linvix,

SimpleXML tiene un método para leer los namespaces: getNamespaces, en general te recomiendo leas la documentación de SimpleXML.

Saludos.
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 00:45.