XML DataSet•Categorize Line Items to Make Selection Easier

Listing B. This DataSet stream returned from a SQLXML 3.0 Web service populates a Product Categories dropdown list (see Figure 2). Making a selection in this list populates the "Products in Category" dropdown list and binds a DataGrid to a DataView containing only the matching products.

<?xml version="1.0" standalone="yes"?>
<rowset>
   <xs:schema id="rowset" xmlns="" 
         xmlns:xs="http://www.w3.org/2001/XMLSchema" 
         xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
      <xs:element name="rowset" msdata:IsDataSet="true">
         <xs:complexType>
            <xs:choice maxOccurs="unbounded">
               <xs:element name="row">
                  <xs:complexType>
                     <xs:sequence>
                        <xs:element name="CategoryID" type="xs:string" 
                              minOccurs="0" />
                        <xs:element name="CategoryName" type="xs:string" 
                              minOccurs="0" />
                           </xs:sequence>
                  </xs:complexType>
               </xs:element>
            </xs:choice>
         </xs:complexType>
      </xs:element>
   </xs:schema>
   <row>
      <CategoryID>AMPL</CategoryID>
      <CategoryName>Amplifiers</CategoryName>
   </row>
   <!-- 14 categories omitted for brevity -->
   <row>
      <CategoryID>VCRD</CategoryID>
      <CategoryName>Video Cassette Recorders</CategoryName>
   </row>
</rowset>