@Override
    public void parse(String tekst) throws Exception {
        try {
                    //List<Book> lista=new ArrayList<>();
                    Document document=DocumentHelper.parseText(tekst);
                    
                    List list=document.selectNodes("//result");
                    //System.out.println("Velicina liste "+list.size());
                    if(list==null || list.size()==0){
                        System.out.println("Lista je null");
                        end=true;
                    }else{
                        System.out.println("Trenutni broj strana "+currentPageNumber);
                        for(int i=0;i<list.size();i++){
                            Book b=new Book();
                            b.setUri(URIGenerator.generateUri(b));
                            Node node=(Node) list.get(i);
                            b.setTitle(node.selectSingleNode("title").getText());

                            Node isbn=node.selectSingleNode("isbn13");
                            if(isbn!=null){
                                b.setIsbn(isbn.getText());
                            }
                            List autori=node.selectNodes("author");

                            for(int j=0;j<autori.size();j++){
                                Person p=new Person();
                                p.setUri(URIGenerator.generateUri(p));
                                p.setName(((Node) autori.get(j)).getText());
                                b.getAuthors().add(p);
                            }

                            Organization o=new Organization();
                            o.setUri(URIGenerator.generateUri(o));
                            Node publisher=node.selectSingleNode("publisher");
                            if(publisher!=null){
                                o.setName(publisher.getText());
                            }
                            b.setPublisher(o);

                            Node description=node.selectSingleNode("brief-synopsis");
                            if(description!=null){
                                b.setDescription(description.getText());
                            }
                            books.add(b);

                        }
                        currentPageNumber++;
                        //kraj=true;
                    }

                } catch (Exception e) {
                    e.printStackTrace();
                    throw e;
                }
    }