Hi Alexander,
It was actually a bug in the io/xml package. The code in revision
34539 creates a proper xml file
both with 3xoo and with the default (2xoo):
<TMVA__PDEFoam version="3"> ... </TMVA__PDEFoam>
Cheers,
Philippe.
On 7/20/10 2:11 PM, Alexander Voigt wrote:
> Dear ROOT developers,
>
> I had problems writing correct XML files, which contain objects, that
> are in another C++ namespace (for example TMVA::). For example the
> following simple (naive) code creates a non-valid XML file:
>
>
> #inlude "TXMLFile.h"
> #inlude "TMVA/PDEFoam.h"
> {
> // create TMVA::PDEFoam object
> TMVA::PDEFoam *foam = new TMVA::PDEFoam();
> // create XML file
> TXMLFile *file = new TXMLFile("myfoam.xml", "RECREATE", "foamfile");
> // save PDEFoam object to XML file
> foam->Write("MyFoam");
> file->Close();
> delete file;
> delete foam;
> }
>
>
>
> The output XML file contains tags of the form
>
> <TMVA::PDEFoam version="3"> ... </TMVA::PDEFoam>
>
> which are not valid because of the double colons in the tag name.
> I found that using the ROOT XML coding "3xoo", i.e.
>
> TXMLFile *file = new TXMLFile("myfoam.xml", "3xoo", "foamfile");
>
> generates valid a XML file.
>
> Since it took me long to spot this, I would like to make a proposal/
> recommendation for a small note in the class description of TXMLFile
> and/or TXMLSetup about the usage "3xoo" in the XML settings to prevent
> non-valid XML output.
>
>
> Many thanks in advance,
> Alexander Voigt
>
Received on Wed Jul 21 2010 - 19:55:26 CEST
This archive was generated by hypermail 2.2.0 : Wed Jul 21 2010 - 23:50:02 CEST