Changeset 910 for metadata


Ignore:
Timestamp:
11/17/10 14:05:34 (14 years ago)
Author:
dietuyt
Message:

Added XML declaration to CMDI files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • metadata/trunk/toolkit/scripts/lrt2cmdi.py

    r909 r910  
    5959        filename = "lrt-%s.cmdi" % self.nodeId
    6060        self.xmlTree.write(filename, encoding="utf-8")
     61        f = open(filename, 'r+' )
     62        content = f.read().replace('<CMD', '<?xml version="1.0" encoding="UTF-8"?>\n<CMD')
     63        f.close()
     64        f = open(filename, 'w' )
     65        #print content
     66        f.write(content)
     67        f.close
    6168       
    6269    def addFormats(self, format):
     
    237244    dictionary = dict()
    238245    for l in csvFile:
    239         dictionary[l[1]] = unicode(l[0])
     246        dictionary[l[1]] = l[0]
    240247
    241248    return dictionary
Note: See TracChangeset for help on using the changeset viewer.