importing multiple XML files for embedded variables

importing multiple XML files for embedded variables

For normal Variables I have a powershell code that combines all the variables I want to import into a single xml and it works great
but when I try to do the same for embedded variables, it only imports the first variable(with its embedded variables) and ignores everything else.
so theoretically I can just import them one by one and it'd work fine, but I have about 200 of these and so I was looking for a faster way to do this. I tried to get a sample from already existing embedded variables and used that as a template but it still didn't work. I just added my new variables under them to see and the template variables(exported from zenon directly) were imported just fine while my new variables only one of them did