As initial data we'll take 3 books:
In XML the data will look as:
books.xml
<?xml version="1.0" encoding="UTF-8"?> <data> <item id="1"> <name> War and Peace </name> <author> Leo Tolstoy </author> </item> <item id="2"> <name> Hamlet </name> <author> William Shakespeare </author> </item> <item id="3"> <name> Madame Bovary </name> <author> Gustave Flaubert </author> </item> </data>
list(xml).html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <link rel="stylesheet" href="../../../codebase/touchui.css" type="text/css" media="screen" charset="utf-8"> <script src="../../../codebase/touchui.js" type="text/javascript" charset="utf-8"></script> </head> <body> <script type="text/javascript" charset="utf-8"> dhx.ui({ view:"list", url:"xml/books.xml", datatype:"xml", template:"#name# (#author#)", select:true, type: {width: 300} }); </script> </body> </html>