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