Package twisted :: Package persisted :: Module marmalade |
[show private | hide private]
[frames | no frames]

## Module twisted.persisted.marmalade

Marmalade: jelly, with just a hint of bitterness.

I can serialize a Python object to an XML DOM tree (twisted.web.microdom), and therefore to XML data, similarly to twisted.spread.jelly. Because both Python lists and DOM trees are tree data-structures, many of the idioms used here are identical.

Classes
`DOMJellier` |
`DOMJellyable` |
`DOMUnjellier` |

Function Summary
| ``getValueElement`(node)` Get the one child element of a given element.
| ``jellyToDOM`(object)` Convert an Object into an xml.dom.minidom.Document.
| ``jellyToXML`(object, file)` jellyToXML(object, [file]) -> None | string
| ``unjellyFromDOM`(document)` Convert an xml.dom.minidom.Document into a Python object.
| ``unjellyFromXML`(stringOrFile)` I convert a string or the contents of an XML file into a Python object.

Function Details

### getValueElement(node) Get the one child element of a given element. If there is more than one child element, raises ValueError. Otherwise, returns the value element.

### jellyToDOM(object) Convert an Object into an xml.dom.minidom.Document.

### jellyToXML(object, file=None) jellyToXML(object, [file]) -> None | string Converts a Python object to an XML stream. If you pass a file, the XML will be written to that file; otherwise, a string of the XML will be returned.

### unjellyFromDOM(document) Convert an xml.dom.minidom.Document into a Python object.

### unjellyFromXML(stringOrFile) I convert a string or the contents of an XML file into a Python object.

Generated by Epydoc 1.1 on Thu May 8 13:18:35 2003 | http://epydoc.sf.net