         this
 
 
+default_query = (type, tag, key) ->
+    if type is 'attr'
+        tag.attrs[key]
+    else if type is 'text'
+        tag.content
+    else if type is 'tag'
+        key # this should be a tag
+
 class Builder extends EventEmitter
     constructor: (@opts = {}) ->
         # methods

    hide: Tag::hide
    remove: Tag::remove
    replace: Tag::replace

    toString: ->
        "[object AsyncXMLBuilder]"

        return callback?.call(this) if @closed is yes
        @once 'end', callback

    removeAllListeners: (event) =>
        # clear all references
        delete @checkers
        @query = default_query
        EventEmitter::removeAllListeners.call(this, event)

    register: (type, checker) ->
        unless type is 'new' or type is 'end' or type is 'ready'
