Beispiel #1
0
 def end_element(self, name):
     XMLGenerator.end_element(self, name)
     self.context.pop()
     print('end_element:name = ', name, ', self.break_into = ', self.break_into)
     if name == self.break_into:
         self.count += 1
         if self.count >= self.break_after:
             self.count = 0
             for element in reversed(self.context):
                 self.out_file.write("\n")
                 XMLGenerator.end_element(self, element[0])
             self.out_file.cycle()
             for element in self.context:
                 XMLGenerator.start_element(self, *element)
Beispiel #2
0
 def end_element(self, name):
     XMLGenerator.end_element(self, name)
     self.context.pop()
     print('end_element:name = ', name, ', self.break_into = ',
           self.break_into)
     if name == self.break_into:
         self.count += 1
         if self.count >= self.break_after:
             self.count = 0
             for element in reversed(self.context):
                 self.out_file.write("\n")
                 XMLGenerator.end_element(self, element[0])
             self.out_file.cycle()
             for element in self.context:
                 XMLGenerator.start_element(self, *element)
Beispiel #3
0
 def start_element(self, name, attrs):
     XMLGenerator.start_element(self, name, attrs)
     self.context.append((name, attrs))
Beispiel #4
0
 def start_element(self, name, attrs):
     XMLGenerator.start_element(self, name, attrs)
     self.context.append((name, attrs))