set an_xml_document "
  <quotations>
    <onequote>
      <quotation_id>1</quotation_id>
      <insertion_date>1999-01-03</insertion_date>
      <author_name>Bill Gates</author_name>
      <category>Computer Industry Punditry</category>
      <quote>640K ought to be enough for anybody.</quote>
    </onequote>
    <onequote>
      <quotation_id>2</quotation_id>
      <insertion_date>1999-01-04</insertion_date>
      <author_name>John Ciardi</author_name>
      <category>Education</category>
      <quote>A university is what a college becomes when the faculty loses interest in students.</quote>
    </onequote>
   </quotations>
 "

set result [parse_all $an_xml_document]

ReturnHeaders

ns_write "
<html>
<head>
<title>XML parse test</title>
</head>
<body>

<h2>XML Parsing Test</h2>

<hr>

Here is an XML document:

<p>

<pre>
  &lt;quotations&gt;
    &lt;onequote&gt;
      &lt;quotation_id&gt;1&lt;/quotation_id&gt;
      &lt;insertion_date&gt;1999-01-03&lt;/insertion_date&gt;
      &lt;author_name&gt;Bill Gates&lt;/author_name&gt;
      &lt;category&gt;Computer Industry Punditry&lt;/category&gt;
      &lt;quote&gt;640K ought to be enough for anybody.&lt;/quote&gt;
    &lt;/onequote&gt;
    &lt;onequote&gt;
      &lt;quotation_id&gt;2&lt;/quotation_id&gt;
      &lt;insertion_date&gt;1999-01-04&lt;/insertion_date&gt;
      &lt;author_name&gt;John Ciardi&lt;/author_name&gt;
      &lt;category&gt;Education&lt;/category&gt;
      &lt;quote&gt;A university is what a college becomes when the faculty loses interest in students.&lt;/quote&gt;
    &lt;/onequote&gt;
   &lt;/quotations&gt;
</pre>


<p>

and here is the result of call the procedure <code>parse_all</code> on it:

<p>

$result


<hr>
</body>
</html>
"

