 
             super.init(name: name)
         }
-    }
 
-    let name: String
-    let attributes: [Attribute]?
-
-    init(name: String, attributes: [Attribute]?) {
-        self.name = name
-        self.attributes = attributes
+        override public var debugDescription: String {
+            get {
+                return "<\(String(self.dynamicType)): {name: \(name); value: \(value)}>"
+            }
+        }
     }
 }
 


        if rootElementPtr != nil {
            let rootElement = rootElementPtr.memory
            let rootElementName = String(CString: UnsafePointer<Int8>(rootElement.name), encoding: NSUTF8StringEncoding)
            NSLog("Root element name: \(rootElementName)")

            var property = rootElement.properties

            while (property != nil) {
                NSLog("Property: \(String(CString: UnsafePointer<Int8>(property.memory.name), encoding: NSUTF8StringEncoding))")
                property = property.memory.next
            }
        }

        return NSAttributedString(string: "")
/*
        let htmlPtr = UnsafePointer<Int8>(html.bytes)

        xmlResetLastError()

        let options = Int32(XML_PARSE_NONET.rawValue)
        let _ = xmlReadMemory(htmlPtr, Int32(html.length), "", nil, options)

        let errorPtr = xmlGetLastError()

        if errorPtr != nil {
            let messagePtr = errorPtr.memory.message

            if messagePtr != nil {
                let message = String(CString: messagePtr, encoding: NSUTF8StringEncoding)

                DDLogSwift.logDebug(message)
            }
        }

        return NSAttributedString(string: "")
*/

        /*
        let parserDelegate = ParserDelegate()
        let parser = NSXMLParser(data: html)
        parser.delegate = parserDelegate

        if parser.parse() {
            return parserDelegate.output
        } else {

        }

        let attributedString = NSMutableAttributedString(string: "Hello there!")

        let attribute = HTMLTag(name: "HTML", attributes: nil)
        attributedString.addAttribute("HTMLTag", value: attribute, range: NSRange(location: 0, length: attributedString.length))

        return attributedString
 */
    }
}

import Foundation
import libxml2

public class HTMLTag: CustomDebugStringConvertible {
    let name: String
    private(set) var attributes = [Attribute]()

    init(name: String) {
        self.name = name
    }

    public var debugDescription: String {
        get {
            return "<\(String(self.dynamicType)): {name: \(name); attributes: \(String(attributes))}>"
        }
    }
}

extension HTMLTag {

    /// Represents a basic attribute with no value.  This is also the base class for all other
    /// attributes.
    ///
    class Attribute: CustomDebugStringConvertible {
        let name: String

        init(name: String) {
            self.name = name
        }

        public var debugDescription: String {
            get {
                return "<\(String(self.dynamicType)): {name: \(name)}>"
            }
        }
    }

