Loads the settings for this dataset to the inputted parent xml.
        
        :param      xparent | <xml.etree.ElementTree.Element>
189881
def fromXml(cls, xparent):
        
        output = cls()

        for xentry in xparent:
            key = xentry.get('key')
            if not key:
                continue

            typ = xentry.get('type', 'str')

            if typ in DataSet._xmlTypes:
                value = DataSet._xmlTypes[typ][1](xentry)
            else:
                value = xentry.get('value', '')

            output.define(key, value)

        return output
85914
private void setupXMLReader ()
    throws SAXException
    {
    xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
    try {
        xmlReader.setFeature("http://xml.org/sax/features/namespaces",
                             false);
    } catch (SAXException e) {
        // NO OP: it's just extra information, and we can ignore it
    }
    xmlReader.setContentHandler(this);
    }
1000336
def save(self, data, xparent=None):
        
        if xparent is not None:
            elem = ElementTree.SubElement(xparent, 'bool')
        else:
            elem = ElementTree.Element('bool')

        elem.text = nstr(data)
        return elem
414077
def import_element(self, xml_element):
        

        self.xml_element = xml_element

        uri, tag = Element.get_namespace_and_tag(self.xml_element.tag)
        self.namespace = uri
        self.name = tag

        self.load_xml_attrs()

        if self.xml_element.text is None:
            self.text = ''
        else:
            self.text = self.xml_element.text
1298343
def fill_tree(self, tree, input_dict):
        

        def add_element(item, key, value):
            child_name = QtGui.QStandardItem(key)
            child_name.setDragEnabled(False)
            child_name.setSelectable(False)
            child_name.setEditable(False)

            if isinstance(value, dict):
                for ket_child, value_child in value.items():
                    add_element(child_name, ket_child, value_child)
                child_value = QtGui.QStandardItem('')
            else:
                child_value = QtGui.QStandardItem(str(value))
                child_value.setData(value)

            child_value.setDragEnabled(False)
            child_value.setSelectable(False)
            child_value.setEditable(False)
            item.appendRow([child_name, child_value])

        for index, (loaded_item, loaded_item_settings) in enumerate(input_dict.items()):
            # print(index, loaded_item, loaded_item_settings)
            item = QtGui.QStandardItem(loaded_item)

            for key, value in loaded_item_settings['settings'].items():
                add_element(item, key, value)

            value = QtGui.QStandardItem('')
            tree.model().appendRow([item, value])

            if tree == self.tree_loaded:
                item.setEditable(False)
            tree.setFirstColumnSpanned(index, self.tree_infile.rootIndex(), True)
700795
def saveXml(self, xml):
        
        lvls = []
        for logger, level in self.loggerLevels().items():
            lvls.append('{0}:{1}'.format(logger, level))
        
        xlevels = ElementTree.SubElement(xml, 'levels')
        xlevels.text = ','.join(map(str, self.activeLevels()))
        
        xloggerlevels = ElementTree.SubElement(xml, 'logger_levels')
        xloggerlevels.text = ','.join(lvls)
        
        xml.set('filter', wrapVariant(self.uiFilterTXT.text()))
        
        xtree = ElementTree.SubElement(xml, 'tree')
        self.uiRecordTREE.saveXml(xtree)
99822
def save(self, data, xparent=None):
        
        if xparent is not None:
            elem = ElementTree.SubElement(xparent, 'dict')
        else:
            elem = ElementTree.Element('dict')

        for key, value in sorted(data.items()):
            xitem = ElementTree.SubElement(elem, 'item')
            xitem.set('key', nstr(key))
            XmlDataIO.toXml(value, xitem)

        return elem
1278910
def _loadContext(context, xmlElement, attributeToFormatMap):
    
    attribute = _safeGetRequiredAttribute(xmlElement, 'attribute', '<not set>').lower()
    if attribute != '<not set>':  # there are no attributes for internal contexts, used by rules. See perl.xml
        try:
            format = attributeToFormatMap[attribute]
        except KeyError:
            _logger.warning('Unknown context attribute %s', attribute)
            format = TextFormat()
    else:
        format = None

    textType = format.textType if format is not None else ' '
    if format is not None:
        format = _convertFormat(format)

    lineEndContextText = xmlElement.attrib.get('lineEndContext', '#stay')
    lineEndContext = _makeContextSwitcher(lineEndContextText,  context.parser)
    lineBeginContextText = xmlElement.attrib.get('lineBeginContext', '#stay')
    lineBeginContext = _makeContextSwitcher(lineBeginContextText, context.parser)
    lineEmptyContextText = xmlElement.attrib.get('lineEmptyContext', '#stay')
    lineEmptyContext = _makeContextSwitcher(lineEmptyContextText, context.parser)

    if _parseBoolAttribute(xmlElement.attrib.get('fallthrough', 'false')):
        fallthroughContextText = _safeGetRequiredAttribute(xmlElement, 'fallthroughContext', '#stay')
        fallthroughContext = _makeContextSwitcher(fallthroughContextText, context.parser)
    else:
        fallthroughContext = None

    dynamic = _parseBoolAttribute(xmlElement.attrib.get('dynamic', 'false'))

    context.setValues(attribute, format, lineEndContext, lineBeginContext, lineEmptyContext, fallthroughContext, dynamic, textType)

    # load rules
    rules = _loadChildRules(context, xmlElement, attributeToFormatMap)
    context.setRules(rules)
947641
def _load_builtin_xml(xmlpath, parser):
    
    #First we need to get hold of the fortpy directory so we can locate
    #the isense/builtin.xml file.
    result = {}

    el = ET.parse(xmlpath).getroot()
    if el.tag == "builtin":
        for child in el:
            anexec = _parse_xml(child, parser)
            result[anexec.name.lower()] = anexec

    return result
891028
protected function loadRelatedData()
    {
        $settings = [];
        $contextSettings = [];
        if (is_object($this->xPDOSimpleObject)) {
            /** @var array of \modContextSetting $contextSettings */
            $contextSettings = $this->xPDOSimpleObject->getMany('ContextSettings');
        }
        /** @var \modContextSetting $setting */
        foreach ($contextSettings as $setting) {
            $settings[] = $this->makePortableData($setting->toArray());
        }

        $this->related_data = [
            'settings' => $settings
        ];

        // Calls on the event: OnBlendLoadRelatedData
        parent::loadRelatedData();
    }
372615
def toXml(self, xparent=None):
        
        if xparent is None:
            xml = ElementTree.Element('object')
        else:
            xml = ElementTree.SubElement(xparent, 'object')

        xml.set('class', self.__class__.__name__)
        for name, value in self._xmlData.items():
            xprop = ElementTree.SubElement(xml, 'property')
            xprop.set('name', name)
            XmlDataIO.toXml(value, xprop)
        return xml
647201
def saveXml( self, xparent, item ):
        
        key = nativestring(unwrapVariant(item.data(0, Qt.UserRole)))
        
        if ( key == 'separator' ):
            ElementTree.SubElement(xparent, 'separator')
        elif ( key == 'menu' ):
            elem = ElementTree.SubElement(xparent, 'menu')
            elem.set('title', nativestring(item.text(0)))
            
            for c in range(item.childCount()):
                self.saveXml(elem, item.child(c))
        else:
            elem = ElementTree.SubElement(xparent, 'action')
            elem.set('name', key)
1171526
def _load_xml(self):
        
        if self._xml is not None:
            return
        matcher = "\[(?:Normal|Conditional) Substitution\(index=(\d+), type=\d+\)\]"
        self._xml = re.sub(matcher, "{\\1:}",
                           self._template_node.template_format().replace("{", "{{").replace("}", "}}"))
784413
private void loadElement(Element element, Transform t)
			throws ParsingException {
		for (int i = 0; i < processors.size(); i++) {
			ElementProcessor processor = (ElementProcessor) processors.get(i);

			if (processor.handles(element)) {
				processor.process(this, element, diagram, t);
			}
		}
	}
90030
def load_xml(self, filepath):
        """"""
        from os import path
        import xml.etree.ElementTree as ET
        #Make sure the file exists and then import it as XML and read the values out.
        uxpath = path.expanduser(filepath)
        if path.isfile(uxpath):
            tree = ET.parse(uxpath)
            root = tree.getroot()
            if "symlink" in root.attrib:
                self._vardict["symlink"] = root.attrib.lower() == "true"
                
            for child in root:
                if child.tag == "codes":
                    self._load_codes(child)
                elif child.tag == "mappings":
                    self._load_mapping(child)
                elif child.tag == "ssh":
                    self._load_ssh(child)
                elif child.tag == "isense":
                    self._load_isense(child)
                elif child.tag == "libraries":
                    self._load_includes(child)
                elif child.tag == "compilers":
                    self._vardict["compilers"] = child.text
879571
public function loadXML(string $XMLfile): void
    {
        $file = new FileManager();
        $this->xmlData = $file->loadLittleFile($XMLfile);
    }
927760
public void generateXml(Element parent, I_CmsConfigurationParameterHandler config) {

        if (config != null) {
            Element elem = parent.addElement(m_name);
            for (String attrName : m_attrs) {
                String value = config.getConfiguration().get(attrName);
                if (value != null) {
                    elem.addAttribute(attrName, value);
                }
            }
        }
    }