code: @SuppressWarnings("unchecked")
      protected <T extends Result>T createDOMResult(
              Class<T> resultClass) throws SQLException {
  
          try {
              return (resultClass == null) ? ((T) new DOMResult())
                      : resultClass.newInstance();
          } catch (SecurityException ex) {
              throw Exceptions.resultInstantiation(ex);
          } catch (InstantiationException ex) {
              throw Exceptions.resultInstantiation(ex);
          } catch (IllegalAccessException ex) {
              throw Exceptions.resultInstantiation(ex);
          } catch (ClassCastException ex) {
              throw Exceptions.resultInstantiation(ex);
          }
      }
docs: Retrieves a new DOMResult for setting the XML value designated by this
  SQLXML instance.
  
  @param resultClass The class of the result, or null.
  @throws java.sql.SQLException if there is an error processing the XML
  value
  @return for setting the XML value designated by this SQLXML instance.