code: public static DatatypeFactory getDTF() {
          DatatypeFactory dtf = threadDTF.get();
          if (dtf == null) {
              try {
                  dtf = DatatypeFactory.newInstance();
              } catch (Exception e) {
                  throw wrap(e);
              }
              threadDTF.set(dtf);
          }
          return dtf;
      }
docs: Get a thread local DatatypeFactory.
  <p>
  DatatypeFactory is NOT required to be thread safe. This method uses a
  thread local to create one per calling thread.
  
  @return A thread local DatatypeFactory.