27 catch (
const XMLException& toCatch) {
28 cout <<
"Problem to initialise XML !!! " << endl;
31 unique_ptr<DOMImplementation> domImpl( DOMImplementationRegistry::getDOMImplementation(
qtxml::_toDOMS(
"Range")));
32 if( domImpl ==
nullptr )
return false;
33 theDomWriter = domImpl->createLSSerializer();
34 if( theDomWriter ==
nullptr )
return false;
35 if( theDomWriter->getDomConfig()->canSetParameter( XMLUni::fgDOMWRTFormatPrettyPrint,
true ))
36 theDomWriter->getDomConfig()->setParameter( XMLUni::fgDOMWRTFormatPrettyPrint,
true );
38 if( theDoc ==
nullptr )
return false;
39 theTopElement = theDoc->getDocumentElement();
40 theTopElement->appendChild(theDoc->createTextNode(
qtxml::_toDOMS(
"\n")));
41 theOutput = domImpl->createLSOutput();
42 if( theOutput ==
nullptr )
return false;
51 theTopElement->appendChild(theLastLayout);
57 theLastLayout->appendChild(theDoc->createTextNode(
qtxml::_toDOMS(
"\n")));
60 theLastLayout->appendChild(theLastRow);
61 theLastLayout->appendChild(theDoc->createTextNode(
qtxml::_toDOMS(
"\n")));
68 theLastRow->appendChild(theDoc->createTextNode(
qtxml::_toDOMS(
"\n")));
70 theLastRow->appendChild(e1);
81 XMLFormatTarget* formTarget =
new LocalFileFormatTarget(fname.c_str());
82 theOutput->setByteStream(formTarget);
83 theDomWriter->write(theTopElement, theOutput);
87 theDomWriter->release();
bool init()
Write XML file.
~SiPixelConfigWriter()
Destructor.
SiPixelConfigWriter()
Creator.
void write(std::string &fname)
void createColumn(std::string &element, std::string &name)
XMLCh * _toDOMS(std::string temp)
void createLayout(std::string &name)