1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtGen/EvtParserXml.hh
15 // Modification history:
17 // DCC 24 October, 2011 Module created
19 //------------------------------------------------------------------------
21 #ifndef EVTPARSERXML_HH
22 #define EVTPARSERXML_HH
34 bool open(std::string filename);
39 std::string getTagTitle() { return _tagTitle; }
40 std::string getParentTagTitle();
41 int getLineNumber() { return _lineNo; }
42 bool isTagInline() { return _inLineTag; }
44 std::string readAttribute(std::string attribute, std::string defaultValue="");
45 bool readAttributeBool(std::string attribute, bool defaultValue=false);
46 int readAttributeInt(std::string attribute, int defaultValue=-1);
47 double readAttributeDouble(std::string attribute, double defaultValue=-1.);
56 std::string _tagTitle;
58 std::vector<std::string> _tagTree;
60 bool processTagTree();
62 bool expandEnvVars(std::string& str);
63 bool isAlphaNum(char c);