Salome HOME
Change log directory. It is now set in site.pyconf
[tools/sat.git] / src / xmlManager.py
index 5483c7048188e929bdf9882564506421d52730c7..9c84cc18f0fedf5f7749340ae19781536dbb9dba 100644 (file)
@@ -94,15 +94,12 @@ class readXmlFile(object):
         etree_inst = etree.parse(filePath)
         self.xmlroot = etree_inst.parse(filePath)
     
-    def get_attrib_text(self, attribname):
-        '''Parse the root nodes and get all node that have the attribname. Return the list of [(value of attribname, text), ...]
+    def get_attrib(self, node_name):
+        '''Get the attibutes of the node node_name in self.xmlroot
+        
+        :param node_name str: the name of the node
         '''
-        lres = []
-        # Loop on all root nodes
-        for field in self.xmlroot:
-            if attribname in field.attrib:
-                lres.append((field.attrib[attribname], field.text))
-        return lres
+        return self.xmlroot.find(node_name).attrib
     
     def get_node_text(self, node):
         '''Get the text of the first node that has name that corresponds to the parameter node