/* * Copyright (c) 2022, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::DOMParsing { class XMLSerializer final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject); public: static JS::NonnullGCPtr construct_impl(JS::Realm&); virtual ~XMLSerializer() override; WebIDL::ExceptionOr serialize_to_string(JS::NonnullGCPtr root); private: explicit XMLSerializer(JS::Realm&); }; enum class RequireWellFormed { No, Yes, }; WebIDL::ExceptionOr serialize_node_to_xml_string(JS::NonnullGCPtr root, RequireWellFormed require_well_formed); }