Home | Trees | Index | Help |
---|
Package pyxslt :: Module serialize :: Class Serializer |
|
object
--+
|
Serializer
Method Summary | |
---|---|
Create a Serializer object that can be used to serialize one or more sets of Python elements. | |
Free the memory used by the Serializer object. | |
__str__(self)
| |
Serialize one or more Python objects. | |
Serialize a single Python object directly under the root node. | |
str
|
Return the textual version of the XML document that contains the most-recently serialized set of Python objects. |
libxml2.xmlDoc
|
Return a (copy of) the libxml2.xmlDoc that contains the
contents of the most-recently serialized set of Python objects. |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value |
Instance Variable Summary | |
---|---|
list of className, propName tuples |
ignoreRelationship : A list of className, propName tuples that describe properties
that should not be serialized. |
str |
rootTagName : The name of the root tag in the XML document that will be created
during the serialization process. |
libxml2.xmlDoc |
xmlDoc : The XML document that contains the contents of the most-recently
serialized set of Python objects. |
Method Details |
---|
__init__(self,
rootTagName='pyxslt',
ignoreRelationship=[])
Create a Serializer object that can be used to serialize one or more
sets of Python elements.
|
__del__(self)
Free the memory used by the Serializer object.
|
serialize(self, **elements)Serialize one or more Python objects. This method only accepts keyword arguments. Each value in the argument dictionary will be serialized into the document under a tag with the name of the keyword. |
serializeOne(self, element)Serialize a single Python object directly under the root node. Unlike theserialize method,
serializeOne will not wrap the serialized object in an
enclosing tag (other than the root tag).
|
toString(self, encoding='ASCII', prettyPrintXml=False)Return the textual version of the XML document that contains the most-recently serialized set of Python objects.
|
toXmlDoc(self)Return a (copy of) thelibxml2.xmlDoc that contains the
contents of the most-recently serialized set of Python objects. It is
the responsibility of the caller to free this document.
|
Instance Variable Details |
---|
rootTagNameThe name of the root tag in the XML document that will be created during the serialization process.
|
xmlDocThe XML document that contains the contents of the most-recently serialized set of Python objects. This object will be freed by theSerializer class as soon as a new call to serialize or serializeOne is made. Do not cache
this object and do not free it. Most users of the
Serializer class should call toXmlDoc to obtain a copy of the xmlDoc object instead of accessing the
property directly.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jul 12 11:19:10 2006 | http://epydoc.sf.net |