Commit 65ac92d8 authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Trim whitespace of XML content - to be friendlier to hand-edited files.

parent 3e4a11fe
...@@ -21,8 +21,9 @@ ...@@ -21,8 +21,9 @@
/* */ /* */
/*****************************************************************************/ /*****************************************************************************/
#include <boost/tokenizer.hpp> #include <boost/algorithm/string/trim.hpp>
#include <boost/assign.hpp> #include <boost/assign.hpp>
#include <boost/tokenizer.hpp>
#include <limits> #include <limits>
#include <sstream> #include <sstream>
#include <utility> #include <utility>
...@@ -1030,7 +1031,8 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie ...@@ -1030,7 +1031,8 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
unsigned int contentIndex; unsigned int contentIndex;
const std::string & contentVal = content->second; // trim content of whitespace
const std::string contentVal = boost::algorithm::trim_copy(content->second);
std::vector<std::string> contentVals; std::vector<std::string> contentVals;
...@@ -1108,7 +1110,6 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie ...@@ -1108,7 +1110,6 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
std::string dataSetPath = std::string dataSetPath =
contentVals[contentIndex].substr(colonLocation+1); contentVals[contentIndex].substr(colonLocation+1);
hdf5Path = getFullHeavyDataPath(hdf5Path, hdf5Path = getFullHeavyDataPath(hdf5Path,
itemProperties); itemProperties);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment