tdaq-develop-2025-02-12
|
Public Member Functions | |
XmlDocument (const std::string &rootName="ROOT") | |
XmlDocument (const XmlDocument &doc) | |
XmlDocument & | operator= (const XmlDocument &doc) |
xercesc::DOMElement * | addTextElementToParent (const std::string &childName, const std::string &childText, xercesc::DOMElement *parent) |
xercesc::DOMElement * | addTextElementToParent (const std::string &childName, const std::string &childText, const std::string &parentName, unsigned int parentIndex=0) |
void | saveXmlDocument (const std::string &filePath) |
void | recursiveRemoveChild (xercesc::DOMElement *childEl, xercesc::DOMElement *parentEl) |
bool | loadXmlDocument (const std::string &filePath) |
void | outputXmlDocument (std::ostringstream *out, bool dispStdOut=false) |
void | makeDirectoryBinaryTree (const std::string &name, const std::string &rootPath, int indent, xercesc::DOMElement *anchorNode) |
xercesc::DOMElement * | populateBinaryTreeNode (xercesc::DOMElement *anchorNode, const std::string &name, int indent, bool isLeaf) |
void | setAnchors (const std::string &fSystemPath, const std::string &fRootPath) |
void | setDocument (xercesc::DOMDocument *doc) |
void | setDarioStyle (bool darioStyle) |
void | setRootPath (const std::string &rootPath) |
Protected Member Functions | |
void | copyDocument (const xercesc::DOMDocument *toCopy, xercesc::DOMDocument *copy) |
void | recursiveElementCopy (const xercesc::DOMElement *toCopy, xercesc::DOMElement *copy) |
void | initDocument (void) |
void | initPlatform (void) |
void | terminatePlatform (void) |
void | recursiveOutputXmlDocument (xercesc::DOMElement *currEl, std::ostringstream *out, bool dispStdOut=false, const std::string &tabStr="") |
Definition at line 34 of file XmlDocument.h.
XmlDocument::XmlDocument | ( | const std::string & | rootName = "ROOT" | ) |
Definition at line 46 of file XmlDocument.cc.
xercesc::DOMElement * XmlDocument::addTextElementToParent | ( | const std::string & | childName, |
const std::string & | childText, | ||
const std::string & | parentName, | ||
unsigned int | parentIndex = 0 |
||
) |
addTextElementToParent add to parent by instance number of parent name returns pointer to element that is added
Definition at line 237 of file XmlDocument.cc.
xercesc::DOMElement * XmlDocument::addTextElementToParent | ( | const std::string & | childName, |
const std::string & | childText, | ||
xercesc::DOMElement * | parent | ||
) |
addTextElementToParent add to parent by pointer to parent returns pointer to element that is added
Definition at line 190 of file XmlDocument.cc.
|
protected |
Definition at line 257 of file XmlDocument.cc.
void XmlDocument::outputXmlDocument | ( | std::ostringstream * | out, |
bool | dispStdOut = false |
||
) |
XmlDocument::addElementToParent Add field/value element to XML doc at parent On Success, The child index of the added element with respect to the parent is returned and can be used to add children to the new element On Failure, return -1 XmlDocument::addDataElement Add field/value element to XML doc at parent which is returned from getElementsByTagName(parentName), entry number parentNameIndex On Success, The child index of the added element with respect to the parent is returned and can be used to add children to the new element On Failure, return -1 XmlDocument::addDataElement Add field/value element to XML doc at parentIndexArray (with depth of parent indicated by parentIndexArraySize) If parentIndexArray = NULL, element is added with <DATA> parent otherwise, parentIndexArray indicates the parent within the node list for DATA> where the element will be added On Success, The child index of the added element with respect to the parent is returned and can be used to add children to the new element On Failure, return -1 XmlDocument::addXmlData Append <DATA> from xmldoc to this XML doc On Success, The child index within <DATA> of the first element is returned On Failure, return -1 XmlDocument::recursiveAddElementToParent add currEl and its children tree to parentEl XmlDocument::outputXmlDocument recurse through XML theDocument_ and std out and output to stream parameter if not null
Definition at line 471 of file XmlDocument.cc.
|
protected |
XmlDocument::recursiveOutputXmlDocument recursively printout XML theDocument_ to std out and output stream if not null
Definition at line 481 of file XmlDocument.cc.
void XmlDocument::recursiveRemoveChild | ( | xercesc::DOMElement * | childEl, |
xercesc::DOMElement * | parentEl | ||
) |
XmlDocument::getDataElement returns the value for field found occurance number of times returns empty std::string "" if field was not found XmlDocument::recursiveFindElement recursively searches and returns the value for field found occurance number of times XmlDocument::getAllDataElements returns all of the values found for the field in a vector if none found vector will have size 0 XmlDocument::recursiveFindElement recursively searches and returns the value for field found occurance number of times XmlDocument::recursiveRemoveChild remove child and all of child's sub-tree from parent
Definition at line 632 of file XmlDocument.cc.
void XmlDocument::saveXmlDocument | ( | const std::string & | filePath | ) |
XmlDocument::saveXmlDocument wrapper for private outputXML Warning: filePath must be accessible or program will crash!
Definition at line 652 of file XmlDocument.cc.