Ejemplo n.º 1
0
        public ElementExtensions_CopyTo()
        {
            var htmlDocument = new HtmlParser().Parse(string.Empty);

            this.source = htmlDocument.CreateElement("source");
            this.source.SetAttribute("dummy1", string.Empty);
            this.source.SetAttribute("dummy2", string.Empty);
            this.source.SetAttribute("dummy3", string.Empty);
            this.source.SetAttribute("dummy4", string.Empty);

            var childElement = htmlDocument.CreateElement("childElement");

            childElement.SetAttribute("id", "elementId");
            childElement.InnerHtml = "<p>text</p>";

            this.source.AppendChild(childElement);

            this.destination = htmlDocument.CreateElement("target");
        }