Start working on build system.

This commit is contained in:
jmsgrogan 2023-12-20 16:58:22 +00:00
parent 4b308f6c32
commit 521486be62
88 changed files with 1065 additions and 349 deletions

View file

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