Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 12959)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 12960)
@@ -4,4 +4,6 @@
 1.3.2.dev0 (unreleased)
 =======================
+
+* Remove deprecated xml importer and exporter components.
 
 * Rearrange datacenter upload page. Provide modal windows to view all
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 12959)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 12960)
@@ -55,5 +55,5 @@
 from waeup.kofa.interfaces import(
     IKofaObject, IUsersContainer, IUserAccount, IDataCenter,
-    IKofaXMLImporter, IKofaXMLExporter, IBatchProcessor,
+    IBatchProcessor,
     ILocalRolesAssignable, DuplicationError, IConfigurationContainer,
     ISessionConfiguration, ISessionConfigurationAdd, IJobManager,
@@ -1781,49 +1781,4 @@
         return result
 
-class ExportXMLPage(grok.View):
-    """Deliver an XML representation of the context.
-    """
-    grok.name('export.xml')
-    grok.require('waeup.managePortal')
-
-    def render(self):
-        exporter = IKofaXMLExporter(self.context)
-        xml = exporter.export().read()
-        self.response.setHeader(
-            'Content-Type', 'text/xml; charset=UTF-8')
-        return xml
-
-class ImportXMLPage(KofaPage):
-    """Replace the context object by an object created from an XML
-       representation.
-
-       XXX: This does not work for ISite objects, i.e. for instance
-            for complete University objects.
-    """
-    grok.name('importxml')
-    grok.require('waeup.managePortal')
-
-    def update(self, xmlfile=None, CANCEL=None, SUBMIT=None):
-        if CANCEL is not None:
-            self.redirect(self.url(self.context))
-            return
-        if not xmlfile:
-            return
-        importer = IKofaXMLImporter(self.context)
-        obj = importer.doImport(xmlfile)
-        if type(obj) != type(self.context):
-            return
-        parent = self.context.__parent__
-        name = self.context.__name__
-        self.context = obj
-        if hasattr(parent, name):
-            setattr(parent, name, obj)
-        else:
-            del parent[name]
-            parent[name] = obj
-            pass
-        return
-
-
 #
 # FacultiesContainer pages...
Index: in/waeup.kofa/trunk/src/waeup/kofa/browser/templates/exportxmlaction.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/exportxmlaction.pt	(revision 12959)
+++ 	(revision )
@@ -1,8 +1,0 @@
-<span class="yui-button" noclass="actionbarlink">
-  <span class="first-child">
-    <a href="" id="linkbutton1"
-       tal:attributes="href python: view.url(context) + '/export.xml'">
-      <img alt="export as XML"
-	   tal:attributes="src static/actionicon_unpublish.png"/>
-  <span>Export as XML</span></a></span>
-</span>
Index: in/waeup.kofa/trunk/src/waeup/kofa/browser/templates/importxmlaction.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/importxmlaction.pt	(revision 12959)
+++ 	(revision )
@@ -1,9 +1,0 @@
-<span tal:condition="viewlet/can_import"
-      class="yui-button" noclass="actionbarlink">
-  <span class="first-child">
-    <a href="" id="linkbutton1"
-       tal:attributes="href python: view.url(context) + '/importxml'">
-      <img alt="import from XML"
-	   tal:attributes="src static/actionicon_submit.png"/>
-  <span>Import from XML</span></a></span>
-</span>
Index: in/waeup.kofa/trunk/src/waeup/kofa/browser/templates/importxmlpage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/importxmlpage.pt	(revision 12959)
+++ 	(revision )
@@ -1,17 +1,0 @@
-<div>
-  <h2>Import from XML source</h2>
-
-  <div>
-    Please specify an XML source file
-  </div>
-
-  <div>
-    <form method="post" enctype="multipart/form-data">
-      <input type="file" name="xmlfile:file" />
-      <div>
-	<input type="submit" name="SUBMIT" value="Upload" />
-	<input type="submit" name="CANCEL" value="Cancel" />
-      </div>
-    </form>
-  </div>
-</div>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/doctests/app.txt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/doctests/app.txt	(revision 12959)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/doctests/app.txt	(revision 12960)
@@ -57,34 +57,4 @@
   <waeup.kofa.configuration.ConfigurationContainer object at 0x...>
 
-We can export universities. For this we lookup an appropriate exporter
-first::
-
-  >>> from waeup.kofa.interfaces import IKofaExporter
-  >>> exporter = IKofaExporter(myuniversity)
-  >>> exporter
-  <waeup.kofa.utils.importexport.Exporter object at 0x...>
-
-Now we can trigger the export::
-
-  >>> exporter.export()
-  <cStringIO.StringO object at 0x...>
-
-We can also get an XML representation as file. If we do not provide a
-filepath, we will get an instance of `cStringIO.StringIO`, i.e. a
-memory file::
-
-  >>> from waeup.kofa.interfaces import IKofaXMLExporter
-  >>> exporter = IKofaXMLExporter(myuniversity)
-  >>> f = exporter.export()
-  >>> f
-  <cStringIO.StringO object at 0x...>
-
-  >>> print f.read()
-  <?xml version="1.0" encoding="utf-8" ?>
-  <pickle>
-    <initialized_object id="...">
-  ...
-  </pickle>
-
 Kofa plugins
 ============
Index: in/waeup.kofa/trunk/src/waeup/kofa/doctests/importexport.txt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/doctests/importexport.txt	(revision 12959)
+++ 	(revision )
@@ -1,145 +1,0 @@
-Importing and Exporting Things
-******************************
-
-The waeup package tries to support all special object types to be
-exportable and importable.
-
-.. :doctest:
-.. :layer: waeup.kofa.testing.KofaUnitTestLayer
-
-As imports and exports of data are a cruical point when doing updates
-or to enable data backups, this support must be considered a serious
-topic for the base functionality of the whole software.
-
-Exports and imports are implemented using the Zope component framework
-capabilities. This means we need some adapters and utilities, which we
-register, by grokking the whole package. This is done on startup
-automatically, but in doctests (like this one) it is done by the
-testlayer.
-
-Furthermore we need something to import/export. As only pickable
-classes are importable/exportable and these have to be defined in some
-globally reachable module, we first define some silly object in
-filesystem and adjust the path to lookup modules:
-
-    >>> import os
-    >>> import sys
-    >>> os.mkdir('stoneage')
-    >>> old_sys_path = sys.path
-    >>> open(os.path.join('stoneage', '__init__.py'), 'wb').write(
-    ... """
-    ... class Cave(object):
-    ...   name = 'Unnamed cave'
-    ...   dinoports = 2
-    ... """)
-    >>> sys.path.append(os.getcwd())
-
-Now we can import stoneage.Cave objects.
-
-
-Exporting XML
-=============
-
-One of the major formats we support for data export is XML.
-
-When we want to export an object, we can choose the destination
-file. If we do not give a file to write to, we get a StringIO object,
-i.e. an in-memory file.
-
-We can export caves. First we create a cave:
-
-    >>> from stoneage import Cave
-    >>> mycave = Cave()
-    >>> mycave.name = 'Freds Cave'
-    >>> mycave.dinoports = 1
-
-Exporting plain XML
--------------------
-
-Now let's export it to XML. To do this we first ask the framework for
-an exporter::
-
-    >>> from waeup.kofa.interfaces import IKofaXMLExporter
-    >>> exporter = IKofaXMLExporter(mycave)
-    >>> exporter
-    <waeup.kofa.utils.importexport.XMLExporter object at 0x...>
-
-All exporters provide an ``export(<obj>)`` method::
-
-    >>> result = exporter.export()
-
-The result is an object of type StringIO. We therefore use its
-`read()` method to get the actual XML data::
-
-    >>> print result.read()
-    <?xml version="1.0" encoding="utf-8" ?>...
-
-
-Generating XML files
---------------------
-
-We can also let the results be written to a file::
-
-    >>> result = exporter.export('myexport.xml')
-    >>> print open('myexport.xml', 'rb').read()
-    <?xml version="1.0" encoding="utf-8" ?>
-    <pickle>
-      <object>
-    ...
-    </pickle>
-
-
-Importing XML
-=============
-
-We can generate objects from XML.
-
-We change the name of the cave:
-
-    >>> mycave.name = 'Another name'
-
-Now we create an importer for that object:
-
-    >>> from waeup.kofa.interfaces import IKofaXMLImporter
-    >>> importer = IKofaXMLImporter(mycave)
-
-Importing from filenames
-------------------------
-
-We can use a filepath to import from the denoted file::
-
-    >>> new_obj = importer.doImport('myexport.xml')
-
-The object created is indeed a cave::
-
-    >>> new_obj
-    <stoneage.Cave object at 0x...>
-
-    >>> new_obj.name
-    'Freds Cave'
-
-The new object is really a new object::
-
-    >>> new_obj is mycave
-    False
-
-Importing from filelike objects
--------------------------------
-
-We can also pass a file-like object instead of a filepath::
-
-    >>> filelike_obj = open('myexport.xml', 'rb')
-    >>> new_obj = importer.doImport(filelike_obj)
-
-The object created is indeed a faculty::
-
-    >>> new_obj
-    <stoneage.Cave object at 0x...>
-
-Clean up::
-
-    >>> import os
-    >>> import shutil
-    >>> sys.path = old_sys_path
-    >>> os.unlink('myexport.xml')
-    >>> shutil.rmtree('stoneage')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/doctests/pages.txt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/doctests/pages.txt	(revision 12959)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/doctests/pages.txt	(revision 12960)
@@ -150,19 +150,4 @@
 
   >>> browser.open('http://localhost/myuniversity//@@change_language?lang=en')
-
-We can export a university as XML::
-
-  >>> browser.open('http://localhost/myuniversity/export.xml')
-  >>> print browser.contents
-  <?xml version="1.0" encoding="utf-8" ?>
-  <pickle>
-  ...
-  </pickle>
-
-  >>> print browser.headers
-  Status: 200 Ok
-  Content-Length: ...
-  Content-Type: text/xml; charset=UTF-8
-  X-Powered-By: Zope (www.zope.org), Python (www.python.org)
 
 
Index: in/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.py	(revision 12959)
+++ 	(revision )
@@ -1,101 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-import unicodecsv as csv # XXX: csv ops should move to dedicated module
-import grok
-import cPickle
-import zope.xmlpickle
-from cStringIO import StringIO
-from zope.interface import Interface
-from waeup.kofa.interfaces import (IKofaObject, IKofaExporter,
-                                   IKofaXMLExporter, IKofaXMLImporter)
-
-def readFile(f):
-    """read a CSV file"""
-    headers = []
-    rows = []
-    f = csv.reader(f)
-    headers = f.next()
-    for line in f:
-        rows.append(line)
-    return (headers, rows)
-
-def writeFile(data):
-    writer = csv.writer(open("export.csv", "wb"))
-    writer.writerows(data)
-
-class Exporter(grok.Adapter):
-    """Export a Kofa object as pickle.
-
-    This all-purpose exporter exports attributes defined in schemata
-    and contained objects (if the exported thing is a container).
-    """
-    grok.context(IKofaObject)
-    grok.provides(IKofaExporter)
-
-    def __init__(self, context):
-        self.context = context
-
-    def export(self, filepath=None):
-        if filepath is None:
-            filelike_obj = StringIO()
-        else:
-            filelike_obj = open(filepath, 'wb')
-        exported_obj = cPickle.dump(self.context, filelike_obj)
-        filelike_obj.close()
-        return filelike_obj
-
-class XMLExporter(grok.Adapter):
-    """Export a Kofa object as XML.
-
-    This all-purpose exporter exports XML representations of pickable
-    objects.
-    """
-    grok.context(Interface)
-    grok.provides(IKofaXMLExporter)
-
-    def __init__(self, context):
-        self.context = context
-
-    def export(self, filepath=None):
-        pickled_obj = cPickle.dumps(self.context)
-        result = zope.xmlpickle.toxml(pickled_obj)
-        if filepath is None:
-            filelike_obj = StringIO()
-        else:
-            filelike_obj = open(filepath, 'wb')
-        filelike_obj.write(result)
-        filelike_obj.seek(0)
-        return filelike_obj
-
-class XMLImporter(grok.Adapter):
-    """Import a Kofa object from XML.
-    """
-    grok.context(Interface)
-    grok.provides(IKofaXMLImporter)
-
-    def __init__(self, context):
-        self.context = context
-
-    def doImport(self, filepath):
-        xml = None
-        if isinstance(filepath, basestring):
-            xml = open(filepath, 'rb').read()
-        else:
-            xml = filepath.read()
-        obj = zope.xmlpickle.loads(xml)
-        return obj
