Saves the data for this tree to the inputed xml entry.
        
        :param      xml | <xml.etree.ElementTree.Element>
        
        :return     <bool> success
346904
def saveSettings(self, settings):
        
        # save order data
        settings.setValue('headerState', wrapVariant(str(self.header().saveState().toBase64())))
        settings.setValue('sortColumn', wrapVariant(str(self.sortColumn())))
        settings.setValue('sortOrder', wrapVariant(str(int(self.sortOrder()))))
        settings.setValue('sortingEnabled', wrapVariant(str(self.isSortingEnabled())))
867325
def tree_to_xml(self):
        """"""

        # Need to remove filter or hidden items will not be saved.
        self.filter_remove(remember=True)

        tree = self.treeview
        root = ET.Element('interface')
        items = tree.get_children()
        for item in items:
            node = self.tree_node_to_xml('', item)
            root.append(node)

        # restore filter
        self.filter_restore()

        return ET.ElementTree(root)
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
538969
def create_node(xml_node: XmlNode, **init_args):
    ''''''
    inst_type = get_inst_type(xml_node)
    init_args['xml_node'] = xml_node
    inst = create_inst(inst_type, **init_args)
    if not isinstance(inst, Node):
        inst = convert_to_node(inst, **init_args)
    return inst
496551
def AnalizarXml(self, xml=""):
        ""
        try:
            if not xml:
                xml = self.XmlResponse
            self.xml = SimpleXMLElement(xml)
            return True
        except Exception, e:
            self.Excepcion = u"%s" % (e)
            return False
858164
def restoreXml(self, xml):
        
        self.uiFilterTXT.setText(xml.get('filter', ''))
        
        xlevels = xml.find('levels')
        xloggerlevels = xml.find('logger_levels')
        xtree = xml.find('tree')
        
        if xlevels is not None and xlevels.text:
            self.setActiveLevels(map(int, xlevels.text.split(',')))
        if xloggerlevels is not None and xloggerlevels.text:
            for key in xloggerlevels.text.split(','):
                logger, lvl = key.split(':')
                lvl = int(lvl)
                self.setLoggerLevel(logger, lvl)
        
        if xtree is not None:
            self.uiRecordTREE.restoreXml(xtree)
1013907
public void save(XMLWriter w) throws KNXMLException
	{
		final List att = new ArrayList();
		att.add(new Attribute(ATTR_TYPE, getType()));
		w.writeElement(TAG_ADDRESS, att, Integer.toString(address));
		w.endElement();
	}
343211
def save(self, filename):
        
        projex.text.xmlindent(self.xmlElement())
        
        try:
            f = open(filename, 'w')
        except IOError:
            logger.exception('Could not save file: %s' % filename)
            return False
            
        f.write(self.toString())
        f.close()
        return True
990871
def save_xml(self, doc, element):
        ''''''
        element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'x', str(self.x))
        element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'y', str(self.y))
        element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'height',
                               str(self.height))
        element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'width',
                               str(self.width))
        element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'direction',
                               dir.to_string(self.direction).lower())
56616
def save_xml(self, doc, element):
        ''''''
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'name', self.name)
        if self.data:
            element.setAttributeNS(RTS_NS, RTS_NS_S + 'data', self.data)
1087751
def AnalizarXml(self, xml=""):
        ""
        try:
            if not xml or xml=='XmlResponse':
                xml = self.XmlResponse 
            elif xml=='XmlRequest':
                xml = self.XmlRequest 
            self.xml = SimpleXMLElement(xml)
            return True
        except Exception, e:
            self.Excepcion = traceback.format_exception_only( sys.exc_type, sys.exc_value)[0]
            return False
960956
private void saveSummaryXml(SampleNode root) {

        root.sortTree();
        Document doc = DocumentHelper.createDocument();
        Element rootElem = doc.addElement("root");
        root.appendToXml(rootElem);
        OutputFormat outformat = OutputFormat.createPrettyPrint();
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        outformat.setEncoding("UTF-8");
        try {
            XMLWriter writer = new XMLWriter(buffer, outformat);
            writer.write(doc);
            writer.flush();
            try (FileOutputStream fos = new FileOutputStream(m_summaryFilename)) {
                fos.write(buffer.toByteArray());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
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)
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
833761
def save(connection)
      xml = %(<ReportTemplateSaveRequest session-id='#{connection.session_id}' scope='#{@scope}'>)
      xml << to_xml
      xml << '</ReportTemplateSaveRequest>'
      response = connection.execute(xml)
      if response.success
        @id = response.attributes['template-id']
      end
    end
1323403
def write_xml(self, xmlfile):
        """"""

        xmlfile = self.get_model_path(xmlfile)
        self.logger.info('Writing %s...', xmlfile)
        self.like.writeXml(str(xmlfile))
754478
def save_xml(self, doc, element):
        '''

        '''
        super(TargetExecutionContext, self).save_xml(doc, element)
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'id', self.id)