@Override
        public void endElement(String uri, String localName, String qName) throws SAXException {
            if ("vertex".equals(qName)) {
                vertexFrom++;
                vertexTo = -1;
                currentCost = -1;
            }
            if ("edge".equals(qName) && vertexTo >= 0 && currentCost > 0) {
                graph[vertexFrom][vertexTo] = currentCost;
                vertexTo = -1;
                currentCost = -1;

            }

        }