1 #ifndef _CondTools_Ecal_XMLHelperFunctions_
2 #define _CondTools_Ecal_XMLHelperFunctions_
13 #include <xercesc/dom/DOMNode.hpp>
19 #include <xercesc/dom/DOM.hpp>
34 const std::string& nodename );
43 template <
class T>
void GetNodeData(xercesc::DOMNode* node,
T& value)
45 std::string value_s =
toNative(node->getTextContent());
46 std::stringstream value_ss(value_s);
53 const std::string&
tag,
57 xercesc::DOMDocument *
doc = parentNode->getOwnerDocument();
58 xercesc::DOMElement* new_node = doc->createElement(
fromNative(tag).c_str());
59 parentNode->appendChild(new_node);
61 std::stringstream value_ss;
64 xercesc::DOMText* tvalue =
65 doc->createTextNode(
fromNative(value_ss.str()).c_str());
66 new_node->appendChild(tvalue);
void GetNodeStringData(xercesc::DOMNode *node, std::string &value)
get the node data as string. Needs to be used to avoid splitting
void WriteNodeWithValue(xercesc::DOMNode *parentNode, const std::string &tag, const T &value)
write a node with
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
void writeHeader(xercesc::DOMNode *parentNode, const EcalCondHeader &header)
write
void GetNodeData(xercesc::DOMNode *node, T &value)
get the node data
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
XercesString fromNative(const char *str)
xercesc::DOMElement * writeCell(xercesc::DOMNode *node, const DetId &detid)
Append a Cell node with attributes to.
const DetId readCellId(xercesc::DOMElement *node)
Assuming.
std::string toNative(const XMLCh *str)