An XML Syntax for XQuery
Intended for machine processing and programmer convenience, not for human legibility
In XQuery:
for $t in doc("bib.xml")/bib/book/title
return
$t
In XQueryX:
<?xml version="1.0"?>
<xq:query xmlns:xq="http://www.w3.org/2001/06/xqueryx">
<xq:flwr>
<xq:forAssignment variable="$t">
<xq:step axis="CHILD">
<xq:function name="doc">
<xq:constant datatype="CHARSTRING">bib.xml</xq:constant>
</xq:function>
<xq:identifier>bib</xq:identifier>
</xq:step>
<xq:step axis="CHILD">
<xq:identifier>book</xq:identifier>
</xq:step>
<xq:step axis="CHILD">
<xq:identifier>title</xq:identifier>
</xq:step>
</xq:forAssignment>
<xq:return>
<xq:variable>$t</xq:variable>
</xq:return>
</xq:flwr>
</xq:query>
This syntax is quite out of date.