@@ -0,0 +1,2496 @@
+/*%0A * Copyright (C) 2015 The Animo Project%0A * http://animotron.org%0A *%0A * This file is part of Outrunner.%0A *%0A * Outrunner is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage org.exist.backup;%0A%0Aimport org.xml.sax.helpers.DefaultHandler;%0A%0Aimport javax.xml.parsers.SAXParser;%0Aimport javax.xml.parsers.SAXParserFactory;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.nio.file.*;%0Aimport java.nio.file.attribute.BasicFileAttributes;%0A%0Aimport static java.nio.file.FileVisitResult.CONTINUE;%0A%0A/**%0A * @author %3Ca href=%22mailto:shabanovd@gmail.com%22%3EDmitriy Shabanov%3C/a%3E%0A */%0Apublic class Checker %7B%0A%0A    static SAXParserFactory factory = SAXParserFactory.newInstance();%0A    static DefaultHandler handler = new DefaultHandler();%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        Checker.check(Paths.get(args%5B0%5D));%0A    %7D%0A%0A    private static void checkContents(Path file) %7B%0A        SAXParser saxParser;%0A        try %7B%0A            saxParser = factory.newSAXParser();%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A%0A        try (InputStream in = Files.newInputStream(file)) %7B%0A            saxParser.parse(in, handler);%0A        %7D catch (Exception e) %7B%0A            System.out.println(file.toString()+%22 %22+e.getMessage());%0A        %7D%0A    %7D%0A%0A    private static void check(final Path path) throws Exception %7B%0A        Files.walkFileTree(path, new SimpleFileVisitor%3CPath%3E() %7B%0A            @Override%0A            public FileVisitResult visitFile(Path file, BasicFileAttributes attr) throws IOException %7B%0A                if (attr.isRegularFile()) %7B%0A                    if (file.getFileName().toString().equals(%22__contents__.xml%22)) %7B%0A                        checkContents(file);%0A                    %7D%0A                %7D else if (attr.isSymbolicLink()) %7B%0A                %7D else %7B%0A                %7D%0A%0A                return CONTINUE;%0A            %7D%0A        %7D);%0A    %7D%0A%7D%0A

chekc __contents__.xml to be valid xml