Source of questions.asp

<% Option Explicit %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Categories listing</title>
</head>
<body>
<!-- #include file=AjaxLibrary.asp -->
<%
Dim CatID : CatID = Request("category")
Dim CatRS : Set CatRS = DB.Execute("Select * From Categories Where CategoryId = '" & CatID & "'")
Dim QueRS : Set QueRS = DB.Execute("Select * From QA Where Category = '" & CatID & "'")
Dim QList : Set QList = NewXMLObject("Category")
 
Dim QNode
 
If CatRS.EOF Then PrintError "Unknown category: " & CatID
 
With QList.documentElement
  .setAttribute "id",CatRS("CategoryId").Value
  .setAttribute "name",CatRS("CategoryName").Value
End With
 
While Not QueRS.EOF
  Set QNode = NewXMLElement(QList,"Question",Null)
  QNode.setAttribute "id",QueRS("QuestionId").Value
  InsertHTMLFragment QNode,QueRS("Question").Value
  QueRS.MoveNext
WEnd
 
OutputXMLResponse QList,"questions.xsl"
%>
</body>
</html>