Import .xml files to Dynamo for the purpose of Energy Analysis

Hi everyone,
I am quite new to Dynamo, and recently I’ve been working on energy analysis using Dynamo Revit, but I keep receiving some bugs and null answers that I don’t have any idea how to resolve them.
I have my .xml file including the information on Energy Analysis in the cloud, to do energy analysis using the “Energy Analysis for Dynamo” package in Dynamo, and take the Annual Energy Cost using this package. (I want to implement optimization using Optimo package, and Annual Energy Cost is one of my objective functions)
I have a list of inputs and want to change the result of this energy analysis based on these inputs in every iteration. In the first step, I need to import the result of the energy analysis into Dynamo, but I can’t. Does anyone have any information to help me?
Many thanks in advance.

Can you share dyn and xml? We’ll try to help.

Yes, sure. And thanks for your response.
I did a few changes and now I am stuck here, with this error in my python code:

Warning: ArgumentException : There is no main EnergyAnalysisDetailModel in the document, or the current main EnergyAnalysisDetailModel is not compatible with the option set in the GBXMLExportOptions.
Parameter name: options at Autodesk.Revit.DB.Document.Export(String folder, String name, GBXMLExportOptions options)

dyn file:
EnergyTest.dyn (20.4 KB)

xml file:(when you download just delete .7z extension )
FinalTest.xml.7z (180.2 KB)