docs: @SuppressWarnings("unchecked")
      protected <T extends Source>T createDOMSource(
              Class<T> sourceClass) throws SQLException {
  
          DOMSource source = null;
  
          try {
              source = (sourceClass == null) ? new DOMSource()
                      : (DOMSource) sourceClass.newInstance();
          } catch (SecurityException ex) {
              throw Exceptions.sourceInstantiation(ex);
          } catch (IllegalAccessException ex) {
              throw Exceptions.sourceInstantiation(ex);
          } catch (InstantiationException ex) {
              throw Exceptions.sourceInstantiation(ex);
          } catch (ClassCastException ex) {
              throw Exceptions.sourceInstantiation(ex);
          }
  
          Transformer  transformer  = JDBCSQLXML.getIdentityTransformer();
          InputStream  inputStream  = this.getBinaryStreamImpl();
          StreamSource streamSource = new StreamSource();
          DOMResult    domResult    = new DOMResult();
  
          streamSource.setInputStream(inputStream);
  
          try {
              transformer.transform(streamSource, domResult);
          } catch (TransformerException ex) {
              throw Exceptions.transformFailed(ex);
          }
          source.setNode(domResult.getNode());
  
          return (T) source;
      }