(self, obj)
| 108 | def XMLEncodeBody(self,body): |
| 109 | return self.XMLEncoder.encode(body) |
| 110 | def XMLEncodeObject(self, obj): |
| 111 | #TODO: Make Attribution List attributes |
| 112 | #TODO: Make all objects __hash__ and __eq__ |
| 113 | out=StringIO.StringIO() |
| 114 | G=XMLGenerator(out) |
| 115 | obj.XMLSAXEncode(self,G) |
| 116 | return out.getvalue() |
| 117 | if (len(obj.attributes)==0): |
| 118 | return "".join(obj.XMLPreEncode(self)) |
| 119 | else: |
| 120 | toencode=copy(obj) |
| 121 | toencode.attributes={} |
| 122 | #FIXME: look on order |
| 123 | attribution=OMAttribution(*([OMAttributePair(k,obj.attributes[k])\ |
| 124 | for k in obj.attributes])+[toencode]) |
| 125 | return attribution.XMLEncode(self) |
| 126 | class SimpleErrorHandler(object): |
| 127 | def __init__(self): |
| 128 | super(SimpleErrorHandler,self).__init__() |
no test coverage detected