public ArrayList<Copy> getCopies() {
        BookDAL objBookDAL = new BookDAL();
        ArrayList<Book> listBooks = objBookDAL.getBooks();
        ArrayList<Copy> copyList = new ArrayList();
        try {
            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            Document doc = docBuilder.parse(new File("db/DBcopies.xml"));
            doc.getDocumentElement().normalize();
            NodeList copyNodes = doc.getElementsByTagName("copy");
            for (int i = 0; i < copyNodes.getLength(); i++) {
                Node copy = copyNodes.item(i);
                if (copy.getNodeType() == Node.ELEMENT_NODE) {
                    Element anElement = (Element) copy;
                    Copy objCopy = new Copy();
                    objCopy.setBookCode(Integer.parseInt(getNodeValue("bookcode", anElement)));
                    String state = getNodeValue("state", anElement);
                    switch (state) {
                        case "BORROWED":
                            objCopy.setState(Copy.CopyState.BORROWED);
                            break;
                        case "STORED":
                            objCopy.setState(Copy.CopyState.STORED);
                            break;
                        default:
                            throw new AssertionError();
                    }
                    String bookid = getNodeValue("isbn", anElement);
                    Book myBook = new Book();
                    myBook.setISBN(bookid);
                    int comparation = listBooks.indexOf(myBook);
                    if (comparation != -1) {
                        myBook.setISBN(listBooks.get(comparation).getISBN());
                        myBook.setTitle(listBooks.get(comparation).getTitle());
                        myBook.setType(listBooks.get(comparation).getType());
                        myBook.setImage(listBooks.get(comparation).getImage());
                        myBook.setEditorial(listBooks.get(comparation).getEditorial());
                        myBook.setEdition(listBooks.get(comparation).getEdition());
                        myBook.setYear(listBooks.get(comparation).getYear());
                        for (int j = 0; j < listBooks.get(comparation).getAuthor().size(); j++) {
                            myBook.setAuthor(listBooks.get(comparation).getAuthor().get(j));
                        }
                        objCopy.setBook(myBook);
                    }
                    copyList.add(objCopy);
                }
            }
        } catch (ParserConfigurationException | SAXException | IOException parseE) {
            JOptionPane.showMessageDialog(null, parseE.getMessage(), "" + "Error", JOptionPane.ERROR_MESSAGE);
        }
        return copyList;
    }