consolidate XML input/output wrapping and documentation needed
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
libxml2 is a C library and easy to leak memory if used improperly. See #1801
To avoid these problems, xml usage needs to be cleanly wrapped and we are doing so.
The other purpose of wrapping is to do validation at the wrapper level.
Our wrapper classes live in src/OhmmsData
XMLParsingString.h handles xml node content to string and one attribute to string.
ParameterSet.h handles a set of parameters like
```
1
2
1.0
no
```
AttributeSet.h handles a set of attributes like
```
```
By grepping the source with xmlGet/xmlSet/xmlNew, I still find many direct use of xml outside the wrapper class. I think we can make better use of our wrapper class and kill all the ugly casting in
> https://github.com/QMCPACK/qmcpack/blob/1bc600726713c6758237bb11dbb91837110077b2/src/QMCTools/QMCGaussianParserBase.cpp#L1073
Also in QMCCostFunctionBase::updateXmlNodes we need the wrapper class to handle writing xml instead of doing it directly.
Contributor guide
Assessment
This issue has not been assessed yet.