import org.xml.sax.* ;
import org.xml.sax.helpers.XMLReaderFactory ;
import java.util.* ;

public class PrintLibrary
{
    public static void main( String args[] ) throws Exception
    {
        XMLReader parser = XMLReaderFactory.createXMLReader();
        Map library = new HashMap();
        ContentHandler libraryCreator = new LibraryCreator( library );
        parser.setContentHandler( libraryCreator );
        
        parser.parse( "library.xml" );
        
        Object[] keys = library.keySet().toArray();
        for( int i = 0 ; i < keys.length; i++ )
        {
            System.out.print( library.get( keys[i] ).toString() );
            System.out.println();
        }
        
        System.out.println( "Done" );
    }
}