4 #include <xercesc/dom/DOMNode.hpp>
5 #include <xercesc/dom/DOM.hpp>
6 #include <xercesc/parsers/XercesDOMParser.hpp>
8 #include <xercesc/util/XMLString.hpp>
9 #include <xercesc/sax/SAXException.hpp>
10 #include <xercesc/framework/LocalFileFormatTarget.hpp>
17 using namespace XERCES_CPP_NAMESPACE;
24 std::fstream fs(filename.c_str(),
ios::out);
35 DOMImplementation* impl =
36 DOMImplementationRegistry::getDOMImplementation(
fromNative(
"LS").c_str());
38 DOMWriter* writer =
static_cast<DOMImplementationLS*
>(impl)->createDOMWriter( );
39 writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
41 DOMDocumentType* doctype = impl->createDocumentType(
fromNative(
"XML").c_str(), 0, 0 );
46 doc->setEncoding(
fromNative(
"UTF-8").c_str() );
47 doc->setStandalone(
true);
50 DOMElement*
root = doc->getDocumentElement();
static std::string dumpXML(const EcalCondHeader &header, const ESGain &record)
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
const std::string ESGain_tag("ESGain")
const std::string ADCToGeVConstant_tag("EcalADCToGeVConstant")
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
static int writeXML(const std::string &filename, const EcalCondHeader &header, const ESGain &record)
XercesString fromNative(const char *str)
std::string toNative(const XMLCh *str)
string root
initialization