transform xml file without xml tag for root

Topics: General
Nov 9, 2012 at 3:19 PM

Hi!

 

I have a file called "ProfileCatalog.xml" in a project, which contains:

<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0"> 

<Section Name="Splash">   

<Modules>    </Modules> 

</Section>

</SolutionProfile>

 

in a package, I have a "ProfileCatalog.xml.transform" file, containing:

<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0"> 

<Section Name="Splash">   

<Modules><ModuleInfo AssemblyFile="ControlCenter.SplashScreen.dll" /></Modules> 

</Section>

</SolutionProfile>

 

so, I expect that when transformation is done, I have:

 

<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0"> 

<Section Name="Splash">   

<Modules><ModuleInfo AssemblyFile="ControlCenter.SplashScreen.dll" /></Modules> 

</Section>

</SolutionProfile>

 

but I have:

<?xml .....................?>

<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0"> 

<Section Name="Splash">   

<Modules><ModuleInfo AssemblyFile="ControlCenter.SplashScreen.dll" /></Modules> 

</Section>

</SolutionProfile>

 

with an xml root tag.

I know it shoud not cause problem, but the file is parsed at runtime by a class that expect to have the "SolutionProfile" tag for root.

 

is there something to do?

 

 

Nov 9, 2012 at 3:30 PM

I realize I have some control on the class that causes problems, so the problem is solved