Back to index

plone3  3.1.7
Public Attributes | Static Public Attributes | Properties | Private Member Functions
GenericSetup.utils.XMLAdapterBase Class Reference
Inheritance diagram for GenericSetup.utils.XMLAdapterBase:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.utils.XMLAdapterBase:
Collaboration graph
[legend]

List of all members.

Public Attributes

 context
 environ

Static Public Attributes

string mime_type = 'text/xml'
string name = ''
string suffix = '.xml'
string filename = ''

Properties

 body = property(_exportBody, _importBody)
 node = property(_exportSimpleNode, _importSimpleNode)

Private Member Functions

def _exportBody
def _importBody

Detailed Description

XML im- and exporter base.

Definition at line 520 of file utils.py.


Member Function Documentation

XML im- and exporter base.
Export the object as a file body.

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 527 of file utils.py.

00527 
00528     def _exportBody(self):
00529         """Export the object as a file body.
00530         """
00531         self._doc.appendChild(self._exportNode())
00532         xml = self._doc.toprettyxml(' ')
00533         self._doc.unlink()
00534         return xml

def GenericSetup.utils.XMLAdapterBase._importBody (   self,
  body 
) [private]
Import the object from the file body.

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 535 of file utils.py.

00535 
00536     def _importBody(self, body):
00537         """Import the object from the file body.
00538         """
00539         try:
00540             dom = parseString(body)
00541         except ExpatError, e:
00542             filename = (self.filename or
00543                         '/'.join(self.context.getPhysicalPath()))
00544             raise ExpatError('%s: %s' % (filename, e))
00545         self._importNode(dom.documentElement)

Here is the call graph for this function:


Member Data Documentation

Definition at line 454 of file utils.py.

Definition at line 455 of file utils.py.

Definition at line 554 of file utils.py.

string GenericSetup.utils.XMLAdapterBase.mime_type = 'text/xml' [static]

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 548 of file utils.py.

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 550 of file utils.py.

string GenericSetup.utils.XMLAdapterBase.suffix = '.xml' [static]

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 552 of file utils.py.


Property Documentation

Reimplemented from GenericSetup.utils.BodyAdapterBase.

Definition at line 546 of file utils.py.

Definition at line 500 of file utils.py.


The documentation for this class was generated from the following file: