24 XercesDOMParser*
parser =
new XercesDOMParser;
25 parser->setValidationScheme(XercesDOMParser::Val_Never);
26 parser->setDoNamespaces(
false);
27 parser->setDoSchema(
false);
31 DOMDocument* xmlDoc =
parser->getDocument();
33 std::cout <<
"EcalWeightSetXMLTranslator::Error parsing document" << std::endl;
37 DOMElement* elementRoot = xmlDoc->getDocumentElement();
48 DOMElement* rowelement;
52 rowelement =
dynamic_cast<xercesc::DOMElement*
>(rownode);
56 std::stringstream rowid_ss(rowid_s);
62 std::stringstream weightrow_s(weightrow);
65 while (weightrow_s >>
weight) {
71 rownode = rownode->getNextSibling();
73 while (rownode && rownode->getNodeType() != DOMNode::ELEMENT_NODE)
74 rownode = rownode->getNextSibling();
81 rowelement =
dynamic_cast<xercesc::DOMElement*
>(rownode);
85 std::stringstream rowid_ss(rowid_s);
91 std::stringstream weightrow_s(weightrow);
94 while (weightrow_s >>
weight) {
100 rownode = rownode->getNextSibling();
102 while (rownode && rownode->getNodeType() != DOMNode::ELEMENT_NODE)
103 rownode = rownode->getNextSibling();
110 rowelement =
dynamic_cast<xercesc::DOMElement*
>(rownode);
113 std::stringstream rowid_ss(rowid_s);
119 std::stringstream weightrow_s(weightrow);
122 while (weightrow_s >>
weight) {
128 rownode = rownode->getNextSibling();
130 while (rownode && rownode->getNodeType() != DOMNode::ELEMENT_NODE)
131 rownode = rownode->getNextSibling();
138 rowelement =
dynamic_cast<xercesc::DOMElement*
>(rownode);
141 std::stringstream rowid_ss(rowid_s);
147 std::stringstream weightrow_s(weightrow);
150 while (weightrow_s >>
weight) {
156 rownode = rownode->getNextSibling();
158 while (rownode && rownode->getNodeType() != DOMNode::ELEMENT_NODE)
159 rownode = rownode->getNextSibling();
const std::string id_tag("id")
const std::string row_tag("row")
const std::string wgtChi2AfterSwitch_tag("Chi2WeightAfterSwitch")
std::string toString(XMLCh const *toTranscode)
void readHeader(xercesc::DOMNode *parentNode, EcalCondHeader &header)
read header from
ZStr< XMLCh > uStr(char const *str)
const std::string wgtBeforeSwitch_tag("WeightBeforeSwitch")
const std::string wgtChi2BeforeSwitch_tag("Chi2WeightBeforeSwitch")
xercesc::DOMNode * getChildNode(xercesc::DOMNode *node, const std::string &nodename)
get the child of
const std::string wgtAfterSwitch_tag("WeightAfterSwitch")