def read_param(filename):
    """
        Open the given file and retrieve all parameters written initially for apexAcquisition.method
        NC is written when no value for value is found
        
        structure : <param><name>C_MsmsE</name><value>0.0</value></param>
        
        read_param returns  values in a dictionnary
    """
    from xml.dom import minidom
    xmldoc = minidom.parse(filename)
    x = xmldoc.documentElement
    pp = {}
    children = x.childNodes
    for child in children:
        if child.nodeName == 'paramlist':
            params = child.childNodes
            for param in params:
                if param.nodeName == 'param':
                    if 'name' in param.attributes.keys():
                        k = param.attributes['name'].value
                    for element in param.childNodes:
                        if element.nodeName == 'name':
                            k = element.firstChild.toxml()
                        elif element.nodeName == 'value':
                            try:
                                v = element.firstChild.toxml()
                            except:
                                v = 'NC'
                    pp[k] = v
    return pp
