Example 3-1: XSQL page to query FAQ data from faq_table

<?xml version="1.0"?>
<!-- FAQ.xsql: Return the results of faq_table query as XML Information -->
<xsql:query connection="xmlbook" cat="%" xmlns:xsql="urn:oracle-xsql">

  SELECT category, question, answer, submitted_by,qlevel,
         DECODE(qlevel,1,'Beginner',
                       2,'Intermediate',
                       3,'Advanced') as "LEVEL"
    FROM faq_table
   WHERE category LIKE UPPER('{@cat}')
  ORDER BY category, qlevel

</xsql:query>