Changeset 1809 for TI01-discovery


Ignore:
Timestamp:
04/12/06 19:12:47 (13 years ago)
Author:
selatham
Message:

namespace declaration problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/SpaceTimeIngestFromMOLES.py

    r1797 r1809  
    11#!/usr/bin/env python 
    22import cElementTree 
     3import elementtree.ElementTree as etree 
    34import molesReadWrite as MRW 
    45import sys 
     
    3839    else: 
    3940        print "INFO: moles records are in %s" %indir 
     41 
     42#this is a fix to the  ElementTree namespace problem that namespaces are usually represented as ns0, ns1, ns2 etc. 
     43    etree._namespace_map.update({'http://ndg.nerc.ac.uk/moles': 'moles', 'http://ndg.nerc.ac.uk/csml' : 'csml', 'http://www.w3.org/1999/xlink':'xlink'}) 
    4044    numfilesproc = 0 
    4145 
Note: See TracChangeset for help on using the changeset viewer.