             logElement(elementName, last: true)
             if onElementMatch() {
                 if onLazyMatch() {
-                    println("DONE")
                     parser.abortParsing()
                     return
                 }
 
-                println("popping")
                 parentStack.pop()
             }
             elements.pop()

                return
            }

            // TODO: detect when we we've found our results and abort early!

            if parentStack.count > 0 {
                let key = ops[parentStack.count].key
                if (key == elementName) {
                    let currentNode = parentStack.top().addElement(elementName, withAttributes: attributeDict)
                    parentStack.push(currentNode)
                }
            }
            else {
                let key = ops[0].key
                if (key == elementName) {
                    let currentNode = XMLElement(name: elementName, index: 0)
                    for (keyAny,valueAny) in attributeDict {
                        let key = keyAny as! String
                        let value = valueAny as! String
                        currentNode.attributes[key] = value
                    }
                    parentStack.push(currentNode)
                }
            }
        }
        else {


    func parser(parser: NSXMLParser, foundCharacters string: String?) {
        if lazyLoad {
            if onElementMatch() {
                let current = parentStack.top()
                if current.text == nil {
                    current.text = ""
