#include "HtmlDocument.h"

#include "HtmlHeadElement.h"
#include "HtmlBodyElement.h"

HtmlDocument::HtmlDocument()
    : XmlDocument()
{
    auto root = XmlElement::Create("html");
    SetRoot(std::move(root));

    auto header = std::make_unique<HtmlHeadElement>();
    GetRoot()->AddChild(std::move(header));

    auto body = std::make_unique<HtmlBodyElement>();
    GetRoot()->AddChild(std::move(body));
}

std::shared_ptr<HtmlDocument> HtmlDocument::Create()
{
	return std::make_shared<HtmlDocument>();
}
