1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
11 * \brief Write strings to XML with proper escapes
16 /** Construct with the data to be written. This assumes the data
17 will exist for the duration of this object's life. */
18 cmXMLSafe(const char* s);
19 cmXMLSafe(std::string const& s);
21 /** Specify whether to escape quotes too. This is needed when
22 writing the content of an attribute value. By default quotes
24 cmXMLSafe& Quotes(bool b = true);
26 /** Get the escaped data as a string. */
27 std::string str() const;
33 friend std::ostream& operator<<(std::ostream&, cmXMLSafe const&);