source: TI02-CSML/trunk/csml/testfiles/existtest.py @ 2432

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/csml/testfiles/existtest.py@2432
Revision 2432, 1.0 KB checked in by domlowe, 14 years ago (diff)

removing print statement

Line 
1'''apicalls.py  - test the api'''
2
3import csml,sys
4
5#parse file
6#f='testout.xml'
7##Initialise the CSML container
8#csmlContainer=csml.API.csmlContainer.Container(csmlpath='out.xml',docID="mycsmldoc_1", metadata="mymetadatastring")
9##Initialise and parse the dataset
10#csmldoc = csml.parser.Dataset()
11#csmldoc.parse(f)
12#csmltree=csmldoc.toXML() 
13#csmlout=csml.parser_extra.PrettyPrint(csmltree)
14#csmlout=csml.parser_extra.removeInlineNS(csmlout)
15#print '\n %s'% csmlout
16
17
18
19#parse exist record
20COLLECTION='/db/ndg_A_metadata'
21ID_FIELD='id'
22DOC_ID='J2qIJh1w'
23NSLONG='http://ndg.nerc.ac.uk/csml'
24NSSHORT='csml'
25#Initialise the CSML container
26csmlContainer=csml.API.csmlContainer.Container(csmlpath='out.xml',docID="mycsmldoc_1", metadata="mymetadatastring")
27#Initialise and parse the dataset
28csmldoc = csml.parser.Dataset(xmldb='glue.badc.rl.ac.uk')
29csmldoc.parse(DOC_ID, xmldb='glue.badc.rl.ac.uk', passwords='pass.txt')
30csmltree=csmldoc.toXML() 
31csmlout=csml.parser_extra.PrettyPrint(csmltree)
32csmlout=csml.parser_extra.removeInlineNS(csmlout)
33print '\n %s'% csmlout
34
35
Note: See TracBrowser for help on using the repository browser.