Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/05/2010, 07:59
Avatar de borjalazaroherrero
borjalazaroherrero
 
Fecha de Ingreso: mayo-2010
Mensajes: 10
Antigüedad: 14 años
Puntos: 0
Respuesta: Como puedo separar por temas un xml.

Pues creo no entenderte bien, porque XML otra cosa no es, pero una de sus características es que es extensible, y esto quiere decir que podemos añadir tantos elementos como queramos.

Te pongo el ejemplo que has puesto añadiendo elementos temas. A ver si te vale.

Saludos.

<?xml version="1.0" ?>
<rss version="2.0">

<channel>

<title>All Gadgets Reviewed</title>
<description>If it's a gadget, we review it. Learn what gadgets are hot and what's not!</description>
<link>http://allgadgetsreviewed.com</link>

<item>
<title>Nokia 3650 Combines Phone And Photos</title>
<description>I've been playing with the new Nokia 3650. Finally, someone has got the combination of a cell phone with digital camera capabilities right!</description>
<link>http://allgadgetsreviewed.com/nokia3650.html</link>
<temas>
<tema>japón</tema>
<tema>otro</tema>
</temas>
</item>

<item>
<title>Sanyo Tablet PC Amazes!</title>
<description>I was dubious about the new Tablet PCs, but then I saw the latest from Sanyo. Wow, cool looks and it works!</description>
<link>http://allgadgetsreviewed.com/sanyotablet.html</link>
<temas>
<tema>rusia</tema>
<tema>putin</tema>
</temas>
</item>

<item>
<title>Canon MegaTiny Digital Camera Too Small</title>
<description>OK, there is a limit to just how small is too small. Canon's MetaTiny, no larger than a quarter, simply is too little to use properly</description>
<link>http://allgadgetsreviewed.com/metatiny.html</link>
<temas>
<tema>tecnología</tema>
</temas>
</item>

</channel>

</rss>