Example of xquery in html

html, xquery

Solution

Uhmm... I guess this is a misunderstanding.

Neither javascript itself or any webbrowser (IE, FF, Opera, ...) are XQuery capable or have support build in. You need some other software which has XQuery implemented (check the link provided by Jonathan Sampson). That software could be called from your html site and the results displayed inline

e.g. the wikibook about XQuery uses a eXist server to run their samples and output the result to the browser.

Problem

Can someone give an example of an html page that uses xquery, do you need something else in order to run xquery. I tried to run some xquery code from w3schools but it is not evaluating in the html page. ``` <html> <ul> { for $x in doc("books.xml")/bookstore/book/title order by $x return <li>{$x}</li> } </ul> </html> ```

Original source

Related problems