def parseColorMaps(sourceXml, fileName) :

    xmldoc     = minidom.parse(sourceXml)

    colorMaps = ColorMaps()
    colorMaps.product = os.path.basename(fileName)

    for colorMapNode in xmldoc.documentElement.getElementsByTagName("ColorMap") :

        colorMapAttrDict = dict(colorMapNode.attributes.items())
        colorMap  = ColorMap()
        colorMap.title   = colorMapAttrDict.get('title', '')
        colorMap.units   = colorMapAttrDict.get('units', '')

        colorMap.entries = parseEntries(colorMapNode.getElementsByTagName("Entries")[0])

        if len(colorMapNode.getElementsByTagName("Legend")) > 0 :
            colorMap.legend  = parseLegend(colorMapNode.getElementsByTagName("Legend")[0])

        colorMaps.colormaps.append(colorMap)

    colorMapsList.append(colorMaps)

## END Parse Color Map ##

## START Parse Entries ##
dataset/ETHPy150Open nasa-gibs/onearth/src/scripts/colorMaptoHTML.py/parseColorMaps/original