existe alguna forma de que en una pagina html sencilla muestre informacion contenida en un archivo xml en forma de una tabla??
saludos
| |||
te puede servir <html> <head> <title>Mostrar XML</title> </head> <body> <xml id="Isla" src="datos.xml"></xml> <table width="100%" datasrc="#Isla"> <thead> <tr> <th> Nombre </th> <th> Cargo </th> <th> Telefono </th> <th> Email </th> </tr> </thead> <tbody> <tr> <td><span datafld="nombre"></span></td> <td><span datafld="cargo"></span></td> <td><span datafld="tele"></span></td> <td><span datafld="email"></span></td> </tr> </tbody> </table> Y datos.xml es : <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <!-- <?xml-stylesheet href="staff.css" type="text/css"?> --> <directorio> <empleado> <nombre>Jairo A Rojas B </nombre> <cargo>Ingeniero de Sistemas I</cargo> <tele>6999999</tele> <email>[email protected]</email> </empleado> <empleado> <nombre>Julio H Sánchez R </nombre> <cargo>Ingeniero de Sistemas II</cargo> <tele>6369573</tele> <email>[email protected]</email> </empleado> </directorio> ![]() |