<HTMLScraperConfig>

   <!-- ============================================================================= -->
   <!--  Each StateTransitions tag describes a sequence of HTML events that the       -->
   <!--  scraper should follow. When the parser encounters an HTML Event that matches -->
   <!--  one of an events described within an HTMLEvent element, either a state       -->
   <!--  change is triggered, data extracted from the HTML event, or both. Extracted  -->
   <!--  data is put into named temporary variables that are then transferred to      -->
   <!--  the format described by the ProcessedResult element below.                   -->
   <!-- ============================================================================= -->
   <StateTransitions processedResultType="Record" begState="_None_">

     <HTMLEvent eventType="StartTag" tagType="a" fromState="_None_" toState="FoundRecord" >
       <InputAttribute attrName="href" startWith="http://www.cbsnews.com/stories" />
       <OutputAttribute attrName="href" outputTo="LinkData" />
     </HTMLEvent>

     <HTMLEvent eventType="HandleText" fromState="FoundRecord" toState="FoundRecord" 
                outputTo="TitleData" append="true" />

     <HTMLEvent eventType="EndTag" tagType="a" fromState="FoundRecord" toState="RecordDone"  />

     <HTMLEvent eventType="SimpleTag" tagType="span" fromState="RecordDone" toState="FoundBody" >
       <InputAttribute attrName="class" attrVal="body" />
     </HTMLEvent>

     <HTMLEvent eventType="HandleText" fromState="FoundBody" toState="FoundBody" 
                outputTo="SummaryData" append=" " />

     <HTMLEvent eventType="SimpleTag" tagType="span" 
                fromState="FoundBody" toState="_None_" processResult="true" >
       <InputAttribute attrName="endtag" attrVal="true" />
     </HTMLEvent>

   </StateTransitions>

   <!-- ============================================================================ -->
   <!-- The OutputFormat element describes how scraped data from a StateTransitions  -->
   <!-- element is to be formatted as XML output.                                    -->
   <!-- ============================================================================ -->
   <OutputFormat>
      <RootTag tagName="Records" />
      <ProcessedResult processedResultType="Record" tagName="Record" >
        <ProcessedElement tagName="Title"   charDataFrom="TitleData" />
        <ProcessedElement tagName="Link"    charDataFrom="LinkData" />
        <ProcessedElement tagName="Brief"   charDataFrom="SummaryData" />
      </ProcessedResult>
   </OutputFormat>

</HTMLScraperConfig>
