diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2015-05-23 22:33:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-26 15:09:21 (GMT) |
commit | ed42c203ed4b258091bd6eeaa1fe567c6f9b120a (patch) | |
tree | 1af5663f5d42da0b2304180761f801ebe97e29e1 /Source/CTest/cmCTestGlobalVC.cxx | |
parent | 18825bafd99c6a9c8ec1fb4e7b22a8059c680572 (diff) | |
download | CMake-ed42c203ed4b258091bd6eeaa1fe567c6f9b120a.zip CMake-ed42c203ed4b258091bd6eeaa1fe567c6f9b120a.tar.gz CMake-ed42c203ed4b258091bd6eeaa1fe567c6f9b120a.tar.bz2 |
cmCTestUpdateHandler: Port to cmXMLWriter
Diffstat (limited to 'Source/CTest/cmCTestGlobalVC.cxx')
-rw-r--r-- | Source/CTest/cmCTestGlobalVC.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx index 5f570b5..c091ec4 100644 --- a/Source/CTest/cmCTestGlobalVC.cxx +++ b/Source/CTest/cmCTestGlobalVC.cxx @@ -13,7 +13,7 @@ #include "cmCTest.h" #include "cmSystemTools.h" -#include "cmXMLSafe.h" +#include "cmXMLWriter.h" #include <cmsys/RegularExpression.hxx> @@ -91,36 +91,36 @@ void cmCTestGlobalVC::DoModification(PathStatus status, } //---------------------------------------------------------------------------- -void cmCTestGlobalVC::WriteXMLDirectory(std::ostream& xml, +void cmCTestGlobalVC::WriteXMLDirectory(cmXMLWriter& xml, std::string const& path, Directory const& dir) { const char* slash = path.empty()? "":"/"; - xml << "\t<Directory>\n" - << "\t\t<Name>" << cmXMLSafe(path) << "</Name>\n"; + xml.StartElement("Directory"); + xml.Element("Name", path); for(Directory::const_iterator fi = dir.begin(); fi != dir.end(); ++fi) { std::string full = path + slash + fi->first; this->WriteXMLEntry(xml, path, fi->first, full, fi->second); } - xml << "\t</Directory>\n"; + xml.EndElement(); // Directory } //---------------------------------------------------------------------------- -void cmCTestGlobalVC::WriteXMLGlobal(std::ostream& xml) +void cmCTestGlobalVC::WriteXMLGlobal(cmXMLWriter& xml) { if(!this->NewRevision.empty()) { - xml << "\t<Revision>" << this->NewRevision << "</Revision>\n"; + xml.Element("Revision", this->NewRevision); } if(!this->OldRevision.empty() && this->OldRevision != this->NewRevision) { - xml << "\t<PriorRevision>" << this->OldRevision << "</PriorRevision>\n"; + xml.Element("PriorRevision", this->OldRevision); } } //---------------------------------------------------------------------------- -bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml) +bool cmCTestGlobalVC::WriteXMLUpdates(cmXMLWriter& xml) { cmCTestLog(this->CTest, HANDLER_OUTPUT, " Gathering version information (one . per revision):\n" |