I found a lot of similar questions here, but my major purpose is NOT TO CHANGE the content!!! I just want to indent and adapt blanks, but do not want to change the order or anything else inside the xml / xsd files.
I found a solution in shell: find . -name ".xml" -type f -exec xmllint --output '{}' --format '{}' \; find . -name ".xsd" -type f -exec xmllint --output '{}' --format '{}' \;
But why is this not possible in Java?