public static void main(String[] args)
    {
        try {
            
            Args arg = new Args("a, c*", args);
            boolean displayFullFeed = arg.getBoolean('a');
            String currencyRule = arg.getString('c');
            String rssUrl = "http://rss.nbp.pl/kursy/TabelaA.xml";
            
            ExchangeRateCreator exRateCreator = new ExchangeRateCreator( new HTMLTableParser(), currencyRule );
            XMLReader xmlr = new XMLReader();
            
            if(currencyRule.length() > 0)
            {
                exRateCreator.setCurrencyRule(currencyRule);
            }
            
            xmlr.readRemoteXML(rssUrl);
            
            if(displayFullFeed)
            {
                for (FeedMessage aMessage : xmlr.getFeed().getMessages())
                {
                    for (ExchangeRate aRate : exRateCreator.getExchangeRatesFrom(aMessage))
                    {
                        System.out.println(aRate);
                    }
                }
            } else {
                for (ExchangeRate aRate : exRateCreator.getExchangeRatesFrom( xmlr.getFeed().getMessages().get(0) ))
                {
                    System.out.println(aRate);
                }
            }
        } catch (JCurrencyException ex) {
            System.out.println("Blad: " + ex.errorMessage());
        } catch (ArgsException ex) {
            System.out.println("Blad: " + ex.errorMessage());
        } catch (MalformedURLException ex) {
            System.out.println("Blad: " + ex.getLocalizedMessage());
        } catch (ParseException ex) {
            System.out.println("Blad: " + ex.getLocalizedMessage());
        }
    }