Do bulk replace of stl types.
This commit is contained in:
parent
521486be62
commit
c25a56ee19
531 changed files with 2274 additions and 2181 deletions
|
@ -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 {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue