Exemplo n.º 1
0
        public void TestElement()
        {
            var doc = new HtmlDoc(stream).RootElement;
            HtmlElement node;
            node = doc.Element("h2");
            Assert.IsNull(node);

            node = doc.Element("hello");
            Assert.AreEqual("hello", node.Name);

            node = node.Element("h2");
            Assert.AreEqual("h2", node.Name);
        }
Exemplo n.º 2
0
        public void TestElement()
        {
            var         doc = new HtmlDoc(stream).RootElement;
            HtmlElement node;

            node = doc.Element("h2");
            Assert.IsNull(node);

            node = doc.Element("hello");
            Assert.AreEqual("hello", node.Name);

            node = node.Element("h2");
            Assert.AreEqual("h2", node.Name);
        }