22 parser =
new XercesDOMParser;
23 parser->setValidationScheme(XercesDOMParser::Val_Auto);
24 parser->setDoNamespaces(
false);
28 MemBufInputSource mb((
const XMLByte*)configFile.c_str(), strlen(configFile.c_str()),
"",
false);
31 parser->parse(configFile.c_str());
33 xercesc::DOMDocument*
doc =
parser->getDocument();
38 parser->resetDocumentPool();
40 std::cout <<
"=== This is config file from getNewDocument ==== " << std::endl;
42 MemBufInputSource mb((
const XMLByte*)configFile.c_str(), strlen(configFile.c_str()),
"",
false);
45 parser->parse(configFile.c_str());
47 xercesc::DOMDocument*
doc =
parser->getDocument();
51 unsigned int tagsNum =
parser->getDocument()->getElementsByTagName(
qtxml::_toDOMS(tagName))->getLength();
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
int countNodes(std::string tagName)
Returns the number of nodes with given name.
void getNewDocument(std::string configFile, bool UseDB=false)
Parses a new Document.
virtual ~DQMParserBase()
Destructor.
XMLCh * _toDOMS(std::string temp)