Seems a nice little learning task to transfer this to Java: - command line options - XML processing and namespaces (see https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Document.html) - a recursive subroutine
Seems a nice little learning task to transfer this to Java: