CSc 453: Assignment 1 Part 2 (Example)

This example shows the input and output for a small test file (available here). In each case, the numbers down the left margin are not part of the input file: they are line numbers to show the correspondence between input and output lines.

Input     Output
     1  <html>
     2  <head>
     3  this is some text in the head
     4  </head>
     5
     6  <body>
     7
     8  some text <i>in the </i> 
     9
    10  <b>body
    11  </b>
    12
    13  <ul>
    14    <li>
    15      <ol>
    16        <li>
    17          item 1
    18        </li>
    19      </ol>
    20    </li>
    21    
    22    <li>
    23      item 2
    24    </li>
    25  </ul>
    26
    27  </body>
    28
    29  </html>
     
   
     1
     2
     3  this is some text in the head
     4
     5
     6
     7
     8  some text in the  
     9
    10  body
    11
    12
    13
    14    
    15      
    16        
    17          item 1
    18        
    19      
    20    
    21    
    22    
    23      item 2
    24    
    25
    26
    27
    28
    29