Changeset 1651


Ignore:
Timestamp:
30/10/06 14:55:01 (13 years ago)
Author:
domlowe
Message:

renaming molesWriter

Location:
TI02-CSML/trunk/csml2MolesStuff
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml2MolesStuff/csml2moles.py

    r1650 r1651  
    66import elementtree.ElementTree as etree 
    77import datetime 
    8 import molesWriter as MW 
     8import molesReadWrite as MRW 
    99#this is a fix to the  ElementTree namespace problem that namespaces are usually represented as ns0, ns1, ns2 etc. 
    1010etree._namespace_map.update({ 
     
    121121 
    122122    # MOLES skeleton document: 
    123     M=MW.MolesDoc() 
     123    M=MRW.MolesDoc() 
    124124    M._createClasses() 
    125125     
     
    201201    #create metadata record 
    202202    dgMR=M.dgMetadataRecord(dgMetadataID=dgMID, dgDataEntity=dgDE, dgMetadataDescription=dgMD) 
    203     dgMeta=MW.dgMetadata(dgMetadataRecord=dgMR) 
     203    dgMeta=MRW.dgMetadata(dgMetadataRecord=dgMR) 
    204204 
    205205    #round trip 
     
    217217    #produce XML again (round trip) 
    218218    tree=cElementTree.ElementTree(file='molesout.xml') 
    219     dgMeta=MW.dgMetadata() 
     219    dgMeta=MRW.dgMetadata() 
    220220    dgMeta.fromXML(tree.getroot()) 
    221221    molestree=dgMeta.toXML() 
     
    223223    moles=csml.parser_extra.PrettyPrint(molestree) 
    224224    print '\n \n \n AFTER PARSING' 
    225     #print moles    
    226     f=open('molesout2.xml','w') 
    227     f.write(moles) 
    228     f.close() 
     225    print moles    
     226    #f=open('molesout2.xml','w') 
     227    #f.write(moles) 
     228    #f.close() 
     229    #do an xml diff on 1 and 2? 
    229230    
    230231if __name__=='__main__': 
  • TI02-CSML/trunk/csml2MolesStuff/molesReadWrite.py

    r1650 r1651  
    99             
    1010    def _combineattributes(self,attname, newChild): 
    11         print attname 
    1211        att = getattr(self,attname) 
    1312        if isinstance(att,molesElement): 
Note: See TracChangeset for help on using the changeset viewer.