![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/12/2009, 09:34
|
| | Fecha de Ingreso: septiembre-2009
Mensajes: 4
Antigüedad: 15 años, 4 meses Puntos: 0 | |
Respuesta: usar xml en html Buenas de nuevo,
no consigo alcanzar mi objetivo. He probado varias cosas, una de ellas asi:
<html>
<head>
<title>mi pagina
</title>
</head>
<body>
<xml id="2" src="1.xml"></xml>
<table datasrc="#2" width="640" border="1px">
<thead align="left">Tabla de alumnos
<th>Nombre</th>
<th>Apellidos</th>
<th>Edad</th>
</thead>
<tr>
<td><span datafld="body"></span></td>
<td><span datafld="informacion_general"></span></td>
<td><span datafld="estacion"></span></td>
</tr>
</table>
</body>
</html>
y no me funciona. Tb he probado asi:
<script language="JavaScript" for="window" event="onload">
xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="true"
xmlDoc.load("tu archivo xml")
raiz = xmlDoc.documentElement
textoXml.innerText = xmlDoc.xml
</script>
y esto en alguna parte de tu documento
<div id="textXml"></div>
tampoco me funciona.
Rogaría alguien me ayudara con una solucion sencilla, para alguien que tan apenas programa.
Un saludo |