Ignore:
Timestamp:
22/08/06 12:46:52 (13 years ago)
Author:
domlowe
Message:

Fix for XML unicode problems (I think). Tests files to see what format they are then passes the correct encoding information to elementtree. Requres further testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/parser/apicalls.py

    r1344 r1438  
    44import API 
    55 
    6 f='coapec.xml' 
    76f='../Scanner/test.xml' 
    87 
     
    109csml = API.Parser.Dataset() 
    1110csml.parse(f) 
     11 
    1212 
    1313#get list of features in the dataset 
     
    5353subsetCSML, subsetNetCDF, arraySize=feature.subsetToGridSeries(timeSelection,  csmlpath='myfile.xml', ncpath='myfile.nc',**spatialSubsetDictionary) 
    5454 
    55 print subsetCSML #csml document (string) 
     55#parse and pretty print the result 
     56# strCSML=parser_extra.PrettyPrint(subsetCSML) 
     57# strCSML=parser_extra.removeInlineNS(strCSML) 
     58# print strCSML #csml document (string) 
     59print subsetCSML 
    5660print subsetNetCDF # netcdf file (file) 
    5761print 'arraySize: %s' %arraySize 
Note: See TracChangeset for help on using the changeset viewer.