Hey
XML:
HTML:Code:<?xml version="1.0" encoding="utf-8"?> <photobook_cat> <BOOK> <title>LASZLO MOHOLY-NAGY</title> <publisher>Phaidon</publisher> <year>2001</year> </BOOK> <BOOK> <title>EADWEARD MUYBRIDGE</title> <publisher>Phaidon</publisher> <year>2001</year> </BOOK> <BOOK> <title>THE AMERICANS - Robert Frank</title> <publisher>Steidl</publisher> <year>2008</year> </BOOK> <BOOK> <title>DOG DAYS BOGOTA - Alec Soth</title> <publisher>Steidl</publisher> <year>2007</year> </BOOK> </photobook_cat>
I do not succeed in retrieving data from the xml file. Any idea why it doesn't work?HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Databinding via xml & data-isles</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <xml id="photobook_cat" src="photobook_cat.xml"></xml> <table border="1" datasrc="#photobook_cat"> <thead> <tr> <th>Title</th> <th>Publisher</th> <th>Year</th> </tr> </thead> <tfoot> <tr> <th colspan="3">This is a concised outtake of my photobook collection</th> </tr> </tfoot> <tbody> <tr> <td><span datafld="title"></span></td> <td><span datafld="publisher"></span></td> <td><span datafld="year"></span></td> </tr> </tbody> </table> </body> </html>
Also I tried using several doctypes(strict/tranistional/frameset) and they all failed at validation. Is there a way to have a valide document when you want to include xml data into the html document?


Reply With Quote

Bookmarks