Example #1
0
        public void After()
        {
            Document doc = Dcsoup.Parse("<p>One <b>two</b> three</p>");
            Element newNode = new Element(Tag.ValueOf("em"), "");
            newNode.AppendText("four");

            doc.Select("b").First.After(newNode);
            Assert.AreEqual("<p>One <b>two</b><em>four</em> three</p>", doc.Body.Html);

            doc.Select("b").First.After("<i>five</i>");
            Assert.AreEqual("<p>One <b>two</b><i>five</i><em>four</em> three</p>", doc.Body.Html);
        }