00002 :
00003
00004 import sys, os
00005 dbsapipath = os.environ['DBSCMD_HOME']
00006 if dbsapipath not in sys.path:
00007 sys.path.append(dbsapipath)
00008
00009 from dbsApi import DbsApi
00010 api = DbsApi()
00011
00012
00013 results = api.executeQuery(query)
00014
00015
00016 from xml.dom.minidom import parseString
00017 xml = parseString(results)
00018
00019 files = []
00020
00021 for results in xml.getElementsByTagName('results'):
00022 for row in results.getElementsByTagName('row'):
00023 for file in row.getElementsByTagName('file'):
00024 files.append( file.firstChild.data )
00025
00026 return files