private static XmlDocument GenerateXml(Notification notification)
        {
#if NETSTANDARD
            var sw = new StringWriter();
            var xw = XmlWriter.Create(sw, new XmlWriterSettings
            {
                OmitXmlDeclaration = true,
                Indent             = true
            });

            xw.WriteStartElement("toast");

            xw.WriteStartElement("visual");

            xw.WriteStartElement("binding");

            xw.WriteAttributeString("template", "ToastGeneric");

            xw.WriteStartElement("text");
            xw.WriteString(notification.Title ?? string.Empty);
            xw.WriteEndElement();

            xw.WriteStartElement("text");
            xw.WriteString(notification.Body ?? string.Empty);
            xw.WriteEndElement();

            xw.WriteEndElement();

            xw.WriteEndElement();

            xw.WriteStartElement("actions");

            foreach (var(title, actionId) in notification.Buttons)
            {
                xw.WriteStartElement("action");
                xw.WriteAttributeString("content", title);
                xw.WriteAttributeString("activationType", "foreground");
                xw.WriteAttributeString("arguments", actionId);
                xw.WriteEndElement();
            }

            xw.WriteEndElement();

            xw.WriteEndElement();
            xw.Flush();

            var xmlStr = sw.ToString();
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(xmlStr);

            return(xmlDoc);
#else
            var builder = new ToastContentBuilder();

            builder.AddText(notification.Title);
            builder.AddText(notification.Body);

            foreach (var(title, actionId) in notification.Buttons)
            {
                builder.AddButton(title, ToastActivationType.Foreground, actionId);
            }

            return(builder.GetXml());
#endif
        }