Do bulk replace of stl types.

This commit is contained in:
jmsgrogan 2023-12-21 09:18:44 +00:00
parent 521486be62
commit c25a56ee19
531 changed files with 2274 additions and 2181 deletions

View file

@ -3,22 +3,21 @@
#include "XmlDocument.h"
#include "XmlAttribute.h"
std::string XmlWriter::toString(XmlDocument* document)
Status XmlWriter::toString(XmlDocument* document, String& output)
{
std::string content;
if (auto prolog = document->getProlog())
{
content += "<?xml";
output += "<?xml";
for (const auto& [key, attribute] : prolog->getAttributes())
{
content += " " + attribute->getName() + "=\"" + attribute->getValue() + "\"";
output += " " + attribute->getName() + "=\"" + attribute->getValue() + "\"";
}
content += "?>\n";
output += "?>\n";
}
if (auto root = document->getRoot())
{
content += root->toString();
output += root->toString();
}
return content;
return {};
}