Exemplo:
XML:
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> </bookstore>E temos o Html:
<html> <body> <h1>Bookstore</h1> <ul> { for $x in doc("books.xml")/bookstore/book order by $x/title return <li>{data($x/title)}. Category: {data($x/@category)}</li> } </ul> </body>
Mas ao abrir o html não aparece os dados do xml, mas sim exatamente o que esta no html, ou seja, for $x in d...
Alguem poderia me explicar como funciona?????
Grato.