SAX - Document Analysis Example

<?xml version="1.0"?> 
<doc>
      <para>Hello, world!</para> 
<!-- that's all folks -->
      <hr/> 
</doc>

generates following events:

start document 
start element: doc {list of attributes: empty}
      start element: para {list of attributes: empty} characters: Hello, world!
      end element: 
para comment: that's all folks 
start element: hr 
end element: hr 
end element: doc 
end document