public void getPlacesFromCPN(Document doc, PetriNet pn) {
        NodeList placeList = doc.getElementsByTagName("place");
        for (int i = 0; i < placeList.getLength(); i++) {
            Node nNode = placeList.item(i);

            if (nNode.getNodeType() == Node.ELEMENT_NODE) {
                Element eElement = (Element) nNode;
                int id = Integer.parseInt(eElement.getAttribute("id").substring(2));
                int x, y, width, height, capacity;
                String name;
                capacity = 1;
                x = (int) Double.parseDouble(((Element) eElement.getElementsByTagName("posattr").item(0)).getAttribute("x"));
                y = (int) Double.parseDouble(((Element) eElement.getElementsByTagName("posattr").item(0)).getAttribute("y"));
                width = (int) Double.parseDouble(((Element) eElement.getElementsByTagName("ellipse").item(0)).getAttribute("w"));
                height = (int) Double.parseDouble(((Element) eElement.getElementsByTagName("ellipse").item(0)).getAttribute("h"));
                name = eElement.getElementsByTagName("text").item(0).getTextContent();

                String text = ((Element) eElement.getElementsByTagName("type").item(0)).getElementsByTagName("text").item(0).getTextContent();
                String sign = ((Element) eElement.getElementsByTagName("initmark").item(0)).getElementsByTagName("text").item(0).getTextContent();

                if (x < minX) {
                    minX = x;
                }
                if (y < minY) {
                    minY = y;
                }
                if (x > maxX) {
                    maxX = x;
                }
                if (y > maxY) {
                    maxY = y;
                }

                Place p = new Place(name);
                p.setX(x);
                p.setY(y);
                p.setWidth(width);
                p.setHeight(height);
                p.setColor(new Color(10, 10, 10));
                p.setColor2(new Color(255, 255, 255));
                p.setStart(false);
                p.setEnd(false);
                p.setFontSize(16);
                elementInfo.add(new AdditionalElementInfo(id, text, sign, p));
                pn.addPlace(p);
            }
        }

    }