Start working on build system.
This commit is contained in:
parent
4b308f6c32
commit
521486be62
88 changed files with 1065 additions and 349 deletions
24
src/base/core/serialization/xml/XmlWriter.cpp
Normal file
24
src/base/core/serialization/xml/XmlWriter.cpp
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue