Process (marshal) the tag with the specified value using the optional type information. @param content: The content to process. @type content: L{Object}
(self, content)
| 42 | self.appender = ContentAppender(self) |
| 43 | |
| 44 | def process(self, content): |
| 45 | """ |
| 46 | Process (marshal) the tag with the specified value using the |
| 47 | optional type information. |
| 48 | @param content: The content to process. |
| 49 | @type content: L{Object} |
| 50 | """ |
| 51 | log.debug('processing:\n%s', content) |
| 52 | self.reset() |
| 53 | if content.tag is None: |
| 54 | content.tag = content.value.__class__.__name__ |
| 55 | document = Document() |
| 56 | if isinstance(content.value, Property): |
| 57 | root = self.node(content) # root is never used? |
| 58 | self.append(document, content) |
| 59 | else: |
| 60 | self.append(document, content) |
| 61 | return document.root() |
| 62 | |
| 63 | def append(self, parent, content): |
| 64 | """ |