Reloads the environment from an XML description of the environment.
326955
def reset_from_xml_string(self, xml_string):
        """"""

        # if there is an active viewer window, destroy it
        self.close()

        # load model from xml
        self.mjpy_model = load_model_from_xml(xml_string)

        self.sim = MjSim(self.mjpy_model)
        self.initialize_time(self.control_freq)
        if self.has_renderer and self.viewer is None:
            self.viewer = MujocoPyRenderer(self.sim)
            self.viewer.viewer.vopt.geomgroup[0] = (
                1 if self.render_collision_mesh else 0
            )
            self.viewer.viewer.vopt.geomgroup[1] = 1 if self.render_visual_mesh else 0

            # hiding the overlay speeds up rendering significantly
            self.viewer.viewer._hide_overlay = True

        elif self.has_offscreen_renderer:
            render_context = MjRenderContextOffscreen(self.sim)
            render_context.vopt.geomgroup[0] = 1 if self.render_collision_mesh else 0
            render_context.vopt.geomgroup[1] = 1 if self.render_visual_mesh else 0
            self.sim.add_render_context(render_context)

        self.sim_state_initial = self.sim.get_state()
        self._get_reference()
        self.cur_time = 0
        self.timestep = 0
        self.done = False

        # necessary to refresh MjData
        self.sim.forward()
1370550
def restoreXml(self, xml):
        
        if xml is None:
            return False
        
        # restore grouping
        grps = xml.get('grouping')
        if grps is not None:
            self.setGroupingActive(True)
            self.setGroupBy(grps.split(','))
        
        # restore grouping enabled
        grp_enabled = xml.get('groupingActive')
        if grp_enabled is not None:
            self.setGroupingActive(grp_enabled == 'True', autoRefresh=False)
        
        # restore standard tree options
        return super(XOrbTreeWidget, self).restoreXml(xml)
764127
def reload(self):
        
        self.load(self.api.get(self.objName, self.key))
862237
def reload(self, encoding):
        
        assert os.path.exists(self.path)
        self.open(self.path, encoding=encoding,
                  use_cached_encoding=False)
22023
public static void reloadInstance(CFMLEngine engine, ConfigServerImpl configServer)
	    throws SAXException, ClassException, PageException, IOException, TagLibException, FunctionLibException, BundleException {
	Resource configFile = configServer.getConfigFile();

	if (configFile == null) return;
	if (second(configServer.getLoadTime()) > second(configFile.lastModified())) return;
	int iDoNew = doNew(engine, configServer.getConfigDir(), false).updateType;
	boolean doNew = iDoNew != NEW_NONE;

	load(configServer, loadDocument(configFile), true, doNew);

	((CFMLEngineImpl) ConfigWebUtil.getEngine(configServer)).onStart(configServer, true);
    }
962827
def call(env)
      @request = Rack::Request.new(env)
      xml_response = @xmlrpc_handler.process(request_body)
      [200, {'Content-Type' => 'text/xml'}, [xml_response]]
    end
889437
public void reload() {

        List<CmsModule> modules = OpenCms.getModuleManager().getAllInstalledModules();
        @SuppressWarnings("unchecked")
        BeanItemContainer<CmsModuleRow> container = (BeanItemContainer<CmsModuleRow>)getContainerDataSource();
        container.removeAllItems();
        List<CmsModuleRow> newRows = Lists.newArrayList();
        for (CmsModule module : modules) {
            CmsModuleRow row = new CmsModuleRow(module);
            newRows.add(row);
        }
        container.addAll(newRows);
        sort();
        updateCounter();
    }
73580
private function loadXML()
    {
        $xml = str_replace($this->replaceNamespaces, '', $this->getXml());
        $this->xmlData = \simplexml_load_string($xml);
    }
993841
def fromXml(cls, xdata, filepath=''):
        
        builder = cls()
        builder.loadXml(xdata, filepath=filepath)
        return builder
682873
def reload(self):
        """"""

        app_profile_pb = self.instance_admin_client.get_app_profile(self.name)

        # NOTE: _update_from_pb does not check that the project and
        #       app_profile ID on the response match the request.
        self._update_from_pb(app_profile_pb)
825190
def reload_configuration(self, event):
        """"""

        if event.target == self.uniquename:
            self.log('Reloading configuration')
            self._read_config()
851848
public void resetFromXml(String xmlResourcePath) throws JoranException {
    LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
    JoranConfigurator configurator = new JoranConfigurator();
    configurator.setContext(context);
    context.reset();
    configurator.doConfigure(LogbackHelper.class.getResource(xmlResourcePath));
  }
653409
def fromXml( xprofile ):
        
        # determine the proper version
        if xprofile.tag != 'profile':
            return XViewProfile()
        
        version = int(xprofile.get('version', '1'))
        
        # load the legacy information - just layout data
        if version == 1:
            prof = XViewProfile()
            prof.setXmlElement(xprofile)
            return prof
        
        # load latest information
        prof = XViewProfile()
        prof.setName(xprofile.get('name', ''))
        prof.setVersion(float(xprofile.get('profile_version', '1.0')))
        
        ico = xprofile.get('icon')
        if ico is not None:
            prof.setIcon(os.path.expandvars(ico))
        else:
            ico = xprofile.find('icon')
            if ico is not None:
                prof.setIcon(projexui.generatePixmap(ico.text))
        
        # restore data
        xdata = xprofile.find('data')
        if ( xdata is not None ):
            prof._customData = DataSet.fromXml(xdata)
        
        # load description
        xdesc = xprofile.find('desc')
        if ( xdesc is not None ):
            prof.setDescription(xdesc.text)
        
        # load layout
        xlayout = xprofile.find('layout')
        if ( xlayout is not None ):
            prof.setXmlElement(xlayout)
        
        return prof
222345
protected void reloadChangesInfoAfterUC(ImportNodeData currentNodeInfo, String identifier)
      throws PathNotFoundException, IllegalPathException, RepositoryException
   {
      reloadChangesInfoAfterUC(getParent(), currentNodeInfo, identifier);
   }
1069310
def reload(self):
        
        if not isinstance(self.filename, string_types):
            raise ReloadError()

        filename = self.filename
        current_options = {}
        for entry in OPTION_DEFAULTS:
            if entry == 'configspec':
                continue
            current_options[entry] = getattr(self, entry)

        configspec = self._original_configspec
        current_options['configspec'] = configspec

        self.clear()
        self._initialise(current_options)
        self._load(filename, configspec)
969922
def reload(self, index):
        """"""
        finfo = self.data[index]
        txt, finfo.encoding = encoding.read(finfo.filename)
        finfo.lastmodified = QFileInfo(finfo.filename).lastModified()
        position = finfo.editor.get_position('cursor')
        finfo.editor.set_text(txt)
        finfo.editor.document().setModified(False)
        finfo.editor.document().changed_since_autosave = False
        finfo.editor.set_cursor_position(position)

        #XXX CodeEditor-only: re-scan the whole text to rebuild outline
        # explorer data from scratch (could be optimized because
        # rehighlighting text means searching for all syntax coloring
        # patterns instead of only searching for class/def patterns which
        # would be sufficient for outline explorer data.
        finfo.editor.rehighlight()

        self._refresh_outlineexplorer(index)
1245892
def load(source):
    
    parser = get_xml_parser()
    return etree.parse(source, parser=parser).getroot()