public TagExtracter(List<Line> tagLines) {
        StringBuilder sb = new StringBuilder();
        TagClosureCreator.TagClosure itemsHolder = new TagClosureCreator().getHolder();
        TagClosureCreator.TagClosure deleteHolder = new TagClosureCreator().getHolder();

        for (Line line : tagLines) {
            sb.append(line.toString());
            if (line.isRootTagStartLine()) {
                rootTag.setStartLineNumber(line.getLineNumber());
            } else if (line.isRootTagEndLine()) {
                rootTag.setEndLineNumber(line.getLineNumber());
            } else if (line.isItemsTagStartLine()) {
                itemsHolder.getValue().setStartLineNumber(line.getLineNumber());
            } else if (line.isItemsTagEndLine()) {
                itemsHolder.getValue().setEndLineNumber(line.getLineNumber());
                itemsTags.add(itemsHolder.getValue().clone());
                itemsHolder.clear();
            } else if (line.isDeleteTagStartLine()) {
                deleteHolder.getValue().setStartLineNumber(line.getLineNumber());
            } else if (line.isDeleteTagEndLine()) {
                deleteHolder.getValue().setEndLineNumber(line.getLineNumber());
                deleteTags.add(deleteHolder.getValue().clone());
                deleteHolder.clear();
            }
        }

        SAXParserFactory factory = SAXParserFactory.newInstance();
        try {
            SAXParser parser = factory.newSAXParser();
            InputStream is = new ByteArrayInputStream(sb.toString().getBytes());
            TagHandler tagHandler = new TagHandler();
            parser.parse(is, tagHandler);
            Tag generatorTag = tagHandler.getRootTag();
            this.rootTag.setBinds(generatorTag.getBinds());
            this.rootTag.setReplaces(generatorTag.getReplaces());

            List<Tag> itemsTags = tagHandler.getItemsTag();
            for (int i = 0; i < itemsTags.size(); i++) {
                this.itemsTags.get(i).setBinds(itemsTags.get(i).getBinds());
                this.itemsTags.get(i).setReplaces((itemsTags.get(i).getReplaces()));
            }

        } catch (ParserConfigurationException | SAXException | IOException e) {
            throw Throwables.propagate(new SystemException(e));
        }
    }