Part of twisted.persisted View Source
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.Function | instance | Undocumented |
Function | getValueElement | Get the one child element of a given element. |
Class | DOMJellyable | Undocumented |
Class | DOMUnjellier | No class docstring; 3/6 methods documented |
Class | DOMJellier | No class docstring; 2/4 methods documented |
Function | jellyToDOM | Convert an Object into an twisted.web.microdom.Document. |
Function | unjellyFromDOM | Convert an twisted.web.microdom.Document into a Python object. |
Function | jellyToXML | jellyToXML(object, [file]) -> None | string |
Function | unjellyFromXML | I convert a string or the contents of an XML file into a Python object. |
Get the one child element of a given element.
If there is more than one child element, raises ValueError. Otherwise, returns the value element.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.