1 #ifndef HCALConfigDBTools_XMLTools_XMLDOMBlock_h
2 #define HCALConfigDBTools_XMLTools_XMLDOMBlock_h
23 #include <boost/shared_ptr.hpp>
25 #include <xercesc/parsers/XercesDOMParser.hpp>
26 #include <xercesc/sax/HandlerBase.hpp>
27 #include <xercesc/dom/DOM.hpp>
40 XERCES_CPP_NAMESPACE_USE
54 XMLDOMBlock( std::string _root,
int rootElementName );
60 std::string &
getString( DOMNode * _node );
65 const char *
getTagValue(
const std::string &
tagName,
int _item, DOMElement * _document );
70 DOMNode *
setTagValue(
const std::string &
tagName,
const std::string & tagValue,
int _item = 0, DOMDocument * _document =
NULL );
71 DOMNode *
setTagValue( DOMElement * _elem,
const std::string &
tagName,
const std::string & tagValue,
int _item = 0 );
72 DOMNode *
setTagValue(
const std::string &
tagName,
const int & tagValue,
int _item = 0, DOMDocument * _document =
NULL );
73 DOMNode *
setTagValue( DOMElement * _elem,
const std::string &
tagName,
const int & tagValue,
int _item = 0 );
74 DOMNode *
setTagAttribute(
const std::string &
tagName,
const std::string & attrName,
const std::string & attrValue,
int _item = 0 );
75 DOMNode *
setTagAttribute( DOMElement * _elem,
const std::string &
tagName,
const std::string & attrName,
const std::string & attrValue,
int _item = 0);
76 DOMNode *
setTagAttribute(
const std::string &
tagName,
const std::string & attrName,
const int & attrValue,
int _item = 0 );
77 DOMNode *
setTagAttribute( DOMElement * _elem,
const std::string &
tagName,
const std::string & attrName,
const int & attrValue,
int _item = 0);
93 int init( std::string _root );
int write(std::string target="stdout")
XMLProcessor * theProcessor
std::string getTimestamp(time_t _time)
DOMDocument * getDocumentConst(void) const
std::string & getString(void)
DOMDocument * getDocument(void)
DOMDocument * getNewDocument(std::string xmlFileName)
XMLDOMBlock & operator+=(const XMLDOMBlock &other)
int init(std::string _root)
ErrorHandler * errHandler
DOMElement * add_element(DOMElement *parent, XMLCh *tagname, XMLCh *value)
void parse(InputSource &_source)
const char * getTagValue(const std::string &tagName, int _item=0, DOMDocument *_document=NULL)
DOMNode * setTagValue(const std::string &tagName, const std::string &tagValue, int _item=0, DOMDocument *_document=NULL)
DOMNode * setTagAttribute(const std::string &tagName, const std::string &attrName, const std::string &attrValue, int _item=0)
const char * getTagAttribute(const std::string &tagName, const std::string &attrName, int _item=0)