Unified interface for DOM, SAX, StAX parsers.
All you need to do is implement class of Handler interface and then pass it to parser like:
// DeviceHandler implements Handler<Device>
DOMParser<Device> parserDOM = new DOMParser<>(new DeviceHandler());
parserDOM.parse("resources/mouse.xml").toString();