#include "HtmlWriter.h"

#include "HtmlDocument.h"
#include "HtmlElement.h"
#include "XmlElement.h"
#include "XmlAttribute.h"

HtmlWriter::HtmlWriter()
{

}

std::string HtmlWriter::toString(HtmlElement* element, unsigned startDepth)
{
    return element->toString(startDepth);
}

std::string HtmlWriter::toString(HtmlDocument* document)
{
    std::string content = "<!DOCTYPE html>\n";
    if (auto root = document->getRoot())
    {
        content += root->toString();
    }
    return content;
}
