Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Module xmlutil :: Class Serializer |
|
object
--+
|
Serializer
XML serializer class.
This is a customized serializer that I hacked together based on what I found in the PyXML distribution. Basically, around release 2.7.0, the only reason I still had around a dependency on PyXML was for the PrettyPrint functionality, and that seemed pointless. So, I stripped the PrettyPrint code out of PyXML and hacked bits of it off until it did just what I needed and no more.
This code started out being called PrintVisitor, but I decided it
makes more sense just calling it a serializer. I've made nearly all of
the methods private, and I've added a new high-level serialize() method
rather than having clients call visit()
.
Copyright: This code, prior to customization, was part of the PyXML codebase, and before that was part of the 4DOM suite developed by Fourthought, Inc. It its original form, it was Copyright (c) 2000 Fourthought Inc, USA; All Rights Reserved.
Method Summary | |
---|---|
Initialize a serializer. | |
_tryIndent(self)
| |
| |
_visitAttr(self,
node)
| |
_visitCDATASection(self,
node)
| |
_visitComment(self,
node)
| |
_visitDocument(self,
node)
| |
_visitDocumentFragment(self,
node)
| |
_visitDocumentType(self,
doctype)
| |
_visitElement(self,
node)
| |
Visited from a NamedNodeMap in DocumentType | |
_visitEntityReference(self,
node)
| |
_visitNamedNodeMap(self,
node)
| |
_visitNodeList(self,
node,
exclude)
| |
Visited from a NamedNodeMap in DocumentType | |
_visitProcessingInstruction(self,
node)
| |
_visitProlog(self)
| |
_visitText(self,
node)
| |
_write(self,
text)
| |
Serialize the passed-in XML document. | |
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 | |
x.__str__() <==> str(x) |
Method Details |
---|
__init__(self,
stream=<epydoc.imports._DevNull instance at 0x401ff88c>,
encoding='UTF-8',
indent=3)
Initialize a serializer.
|
_visit(self, node)
|
_visitEntity(self, node)Visited from a NamedNodeMap in DocumentType |
_visitNotation(self, node)Visited from a NamedNodeMap in DocumentType |
serialize(self, xmlDom)Serialize the passed-in XML document.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 18 22:53:30 2006 | http://epydoc.sf.net |