diff --git a/pym/cl_profile.py b/pym/cl_profile.py index c746938..414e64d 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -6564,5 +6564,19 @@ the same nodes at one level") def getConfig(self): """Получение текстового файла из XML документа""" data = self.doc.toprettyxml().split("\n") - data = filter(lambda x: x.strip(), data) - return "\n".join(data).replace("\t"," ") + data = map(lambda x: x.replace("\t"," "), + filter(lambda x: x.strip(), data)) + dataOut = [] + z = 0 + lenData = len(data) + lenM2 = lenData - 2 + for i in xrange(lenData): + if i < lenM2 and data[i].endswith(">") and not "<" in data[i+1]: + dataOut.append(data[i] + data[i+1].strip() + data[i+2].strip()) + z = 2 + continue + if z>0: + z -= 1 + continue + dataOut.append(data[i]) + return "\n".join(dataOut)