code: public static void setExpandEntityReferences(boolean b) {
          expandEntities = b;
          getControlDocumentBuilderFactory().setExpandEntityReferences(b);
          getTestDocumentBuilderFactory().setExpandEntityReferences(b);
      }
docs: Whether the parser shall be instructed to expand entity references.
  
  <p>Defaults to false.</p>
  
  @see javax.xml.parsers.DocumentBuilderFactory#setExpandEntityReferences