Software Freedom Law Center

Show
Ignore:
Timestamp:
07/16/08 13:56:38 (6 months ago)
Author:
bkuhn
Message:

r229@hughes: bkuhn | 2008-07-16 13:56:13 -0400

  • Started with XML parsing code
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/small-hacks/python/loblaw/openerp/import.py

    r183 r185  
    1212 
    1313import xmlrpclib,pgdb 
     14import libxml2 
     15import libxslt 
    1416from string import join 
    1517 
     
    3032        either be a fully qualified path name to a configuration file, or the 
    3133        string representing the XML."""  
    32         pass 
     34        self.exporter = exporter 
     35        self.settings = {} 
     36        if config.find("<?xml") == 0: 
     37            self.settings['doc'] = libxml2.parseMemory(settings_xml_server, len(settings_xml_server)) 
     38            self.settings['header'] = settings.doc.xpathNewContext() 
     39        else: 
     40            self.settings['doc'] = libxml2.parseFile(config) 
     41            self.settings['header'] = self.doc.xpathNewContext() 
     42 
    3343    def import(): 
    3444        """import performs the actual import operation from the foreign 

SFLC Main Page

[frdm] Support SFLC