I want to load XML configuration via Apache Commons Configuration2 but also perform XSD validation. The XSD shall not be linked in the (potentially untrusted) configuration file but come from the application.
I could neither find matching examples in the documentation nor in StackOverflow. The one question that is similar to mine has a response only applicable to Apache Commons Configuration1 and it’s answer is not applicable for me.
How can I have the XML configuration file loaded and validated?