Wrapper for _IncrementalWriter providing an Element like interface. This wrapper does not intend to be a complete implementation but rather to deal with those calls used in GraphMLWriter.
| 688 | |
| 689 | |
| 690 | class IncrementalElement: |
| 691 | """Wrapper for _IncrementalWriter providing an Element like interface. |
| 692 | |
| 693 | This wrapper does not intend to be a complete implementation but rather to |
| 694 | deal with those calls used in GraphMLWriter. |
| 695 | """ |
| 696 | |
| 697 | def __init__(self, xml, prettyprint): |
| 698 | self.xml = xml |
| 699 | self.prettyprint = prettyprint |
| 700 | |
| 701 | def append(self, element): |
| 702 | self.xml.write(element, pretty_print=self.prettyprint) |
| 703 | |
| 704 | |
| 705 | class GraphMLWriterLxml(GraphMLWriter): |