private static void readData(String path) throws XMLStreamException {
        XMLInputFactory factory = XMLInputFactory.newInstance();
        File file = new File(path);
        try (BufferedReader bufferedReader = new BufferedReader(new FileReader(file))) {
            XMLStreamReader reader = factory.createXMLStreamReader(bufferedReader);
            FileWriter writer = new FileWriter(path);
            XMLParser parser = new XMLParser(reader);
            parser.parseXml();
            List<Entry> entryList = parser.getEntries();
            writer.writeToFile(entryList);
            System.out.println("Total entries: " + entryList.size());
            System.out.println("Path to converted file: " + writer.getPath());
        } catch (FileNotFoundException e) {
            System.err.printf("No such file");
        } catch (IOException e) {
            System.err.println("Unexpected error: " + e.getMessage());
        }
    }