public static void readShops(File file, Planner planner)
            throws FileNotFoundException, XMLStreamException {

        XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file));
        ObjectStorage objectStorage = planner.getObjectStorage();
        Shop shop = new Shop();
        while (xmlStreamReader.hasNext()) {
            if (xmlStreamReader.getEventType() == XMLStreamConstants.START_ELEMENT) {
                String startLocalName = xmlStreamReader.getLocalName();
                if (startLocalName.equals(SHOP)) {
                    shop.setId(xmlStreamReader.getAttributeValue(0));
                } else if (startLocalName.equals(NAME)) {
                    shop.setName(xmlStreamReader.getElementText());
                } else if (startLocalName.equals(COORDINATES)) {
                    Coordinates coordinates = new Coordinates();
                    coordinates.setX(Integer.parseInt(xmlStreamReader.getAttributeValue(0)));
                    coordinates.setY(Integer.parseInt(xmlStreamReader.getAttributeValue(1)));
                    shop.setCoordinates(coordinates);
                } else if (startLocalName.equals(PRODUCT)) {
                    Product product = new Product();
                    product.setCode(xmlStreamReader.getAttributeValue(0));
                    product.setPrice(Float.parseFloat(xmlStreamReader.getAttributeValue(1)));
                    product.setName(xmlStreamReader.getElementText());
                    shop.getProducts().add(product);
                    objectStorage.add(shop, product);
                }
            } else if (xmlStreamReader.getEventType() == XMLStreamConstants.END_ELEMENT) {
                String endLocalName = xmlStreamReader.getLocalName();
                if (endLocalName.equals(SHOP)) {
                    PlannerContext plannerContext = planner.getPlannerContext();
                    plannerContext.getShops().add(shop);
                    shop = new Shop();
                }
            }
            xmlStreamReader.next();
        }
        xmlStreamReader.close();
    }