         for (index, tagName) in tagNames.enumerate() {
             let parser = HTMLToAttributedString()
 
-            let html = "<\(tagName.0)>Hello <\(tagName.1)>world</\(tagName.1)>!</\(tagName.0)>"
-            let htmlData = html.dataUsingEncoding(NSUTF8StringEncoding)!
-
-            do {
-                let string = try parser.convert(htmlData)
-
-                guard let firstTag = string.firstTag(matchingRange: NSRange(location: 0, length: string.length)) else {
-                    XCTFail("Expected to find the first tag.")
-                    return
-                }
-
-                XCTAssert(firstTag.parent == nil)
-                XCTAssert(firstTag.name == tagNames[index].0.lowercaseString)
-                XCTAssert(firstTag.child == nil)
-
-                guard let secondTag = string.firstTag(insideRange: NSRange(location: 0, length: string.length)) else {
-                    XCTFail("Expected to find the second tag.")
-                    return
-                }
-
-                XCTAssert(secondTag.parent == nil)
-                XCTAssert(secondTag.name == tagNames[index].1.lowercaseString)
-                XCTAssert(secondTag.child == nil)
-            } catch {
-                XCTFail("Unexpected conversion failure.")
-            }
-        }
-    }
-
+            let firstText = "Hello "
+            let secondText = "world"
+            let thirdText = "!"
+            let html = "<\(tagName.0)>\(firstText)<\(tagName.1)>\(secondText)</\(tagName.1)>\(thirdText)</\(tagName.0)>"
+
+            do {
+                let string = try parser.convert(html)
+
+                let rootNode = string.rootNode()
+
+                XCTAssertEqual(rootNode.name, Aztec.AttributeName.rootNode)
+                XCTAssertEqual(rootNode.children.count, 1)
+
+                guard let firstNode = rootNode.children[0] as? ElementNode else {
+                    XCTFail("Expected to find the first node.")
+                    return
+                }
+
+                XCTAssertEqual(firstNode.parent, rootNode)
+                XCTAssertEqual(firstNode.name, tagNames[index].0.lowercaseString)
+                XCTAssertEqual(firstNode.children.count, 3)
+
+                guard let firstTextNode = firstNode.children[0] as? TextNode else {
+                    XCTFail("Expected to find the first text node.")
+                    return
+                }
+
+                XCTAssertEqual(firstTextNode.parent, firstNode)
+                XCTAssertEqual(firstTextNode.text, firstText)
+
+                guard let secondNode = firstNode.children[1] as? ElementNode else {
+                    XCTFail("Expected to find the second node.")
+                    return
+                }
+
+                XCTAssertEqual(secondNode.parent, firstNode)
+                XCTAssertEqual(secondNode.name, tagNames[index].1.lowercaseString)
+                XCTAssertEqual(secondNode.children.count, 1)
+
+                guard let secondTextNode = secondNode.children[0] as? TextNode else {
+                    XCTFail("Expected to find the second text node.")
+                    return
+                }
+
+                XCTAssertEqual(secondTextNode.parent, secondNode)
+                XCTAssertEqual(secondTextNode.text, secondText)
+
+                guard let thirdTextNode = firstNode.children[2] as? TextNode else {
+                    XCTFail("Expected to find the third text node.")
+                    return
+                }
+
+                XCTAssertEqual(thirdTextNode.parent, firstNode)
+                XCTAssertEqual(thirdTextNode.text, thirdText)
+
+            } catch {
+                XCTFail("Unexpected conversion failure.")
+            }
+        }
+    }
 
     /// Test the conversion of a single tag at root level, and double tags at child level to
     /// `NSAttributedString`.

                }

                XCTAssertEqual(secondTextNode.text, secondText)

                /*
                let string = try parser.convert(htmlData)

                guard let firstTag = string.firstTag(insideRange: NSRange(location: 0, length: string.length)) else {
                    XCTFail("Expected to find the first tag.")
                    return
                }

                XCTAssert(firstTag.parent == nil)
                XCTAssert(firstTag.name == tagNames[index].lowercaseString)
                XCTAssert(firstTag.child == nil)
                 */
            } catch {
                XCTFail("Unexpected conversion failure.")
            }
        }
    }
/*
    /// Test the conversion of double tags at the root level to `NSAttributedString`.
    ///
    /// Example: <bold><italic>Hello</italic></bold>

        for (index, tagName) in tagNames.enumerate() {
            let parser = HTMLToAttributedString()

            let firstText = "Hello "
            let secondText = "world"
            let thirdText = "!"
            let html = "<\(tagName.0)>\(firstText)<\(tagName.1)><\(tagName.2)>\(secondText)</\(tagName.2)></\(tagName.1)>\(thirdText)</\(tagName.0)>"

            do {
                let string = try parser.convert(html)

                let rootNode = string.rootNode()

                XCTAssertEqual(rootNode.name, Aztec.AttributeName.rootNode)
                XCTAssertEqual(rootNode.children.count, 1)

                guard let firstNode = rootNode.children[0] as? ElementNode else {
                    XCTFail("Expected to find the first node.")
                    return
                }

                XCTAssertEqual(firstNode.parent, rootNode)
                XCTAssertEqual(firstNode.name, tagNames[index].0.lowercaseString)
                XCTAssertEqual(firstNode.children.count, 3)

                guard let firstTextNode = firstNode.children[0] as? TextNode else {
                    XCTFail("Expected to find the first text node.")
                    return
                }

                XCTAssertEqual(firstTextNode.parent, firstNode)
                XCTAssertEqual(firstTextNode.text, firstText)

                guard let secondNode = firstNode.children[1] as? ElementNode else {
                    XCTFail("Expected to find the second node.")
                    return
                }

                XCTAssertEqual(secondNode.parent, firstNode)
                XCTAssertEqual(secondNode.name, tagNames[index].1.lowercaseString)
                XCTAssertEqual(secondNode.children.count, 1)

                guard let thirdNode = secondNode.children[0] as? ElementNode else {
                    XCTFail("Expected to find the third node.")
                    return
                }

                XCTAssertEqual(thirdNode.parent, secondNode)
                XCTAssertEqual(thirdNode.name, tagNames[index].2.lowercaseString)
                XCTAssertEqual(thirdNode.children.count, 1)

                guard let secondTextNode = thirdNode.children[0] as? TextNode else {
                    XCTFail("Expected to find the second text node.")
                    return
                }

                XCTAssertEqual(secondTextNode.parent, thirdNode)
                XCTAssertEqual(secondTextNode.text, secondText)

                guard let thirdTextNode = firstNode.children[2] as? TextNode else {
                    XCTFail("Expected to find the third text node.")
                    return
                }
                
                XCTAssertEqual(thirdTextNode.parent, firstNode)
                XCTAssertEqual(thirdTextNode.text, thirdText)
            } catch {
                XCTFail("Unexpected conversion failure.")
            }
        }
    }
}
