   [ query ] = argv._
   query = query.trim()
   attribute = argv.attribute?.trim()
+  outer = argv.outer
   loglevel = argv.loglevel.trim()
   {
     query
     attribute
+    outer
     loglevel
   }
 


    strings = []
    for result in results
      strings.push elToString(result, attribute)

    # Print the strings to stdout in such a way that they're all
    # separated by a newline, but the last line doesn't end in one.

#
# This is essentially a simple logging wrapper around jsdom.env
domParse = (html, libs, cb) ->
  opts =
    html: html
    scripts: libs
    parsingMode: 'xml'
    done: (err, window) ->
      if err?
        log.error 'parse', "Error processing DOM with libs: [ '#{libs.join '\', \''}' ]. (#{err})"
        return cb err, window

      log.verbose 'parse', "DOM parse successful with libs: [ '#{libs.join '\', \''}' ]."
      cb err, window
  jsdom.env opts

# elToString
# ----------
#
# depending on the query given by the user, we will be getting an html element,
# or a plain old string. This should be handled elegantly.
elToString = (el, attribute, outer) ->
  if attribute
    log.verbose 'elToString', "Fetching #{attribute} from '#{el}'."
    return el.getAttribute(attribute)
  else if outer && el.outerHTML?
    log.verbose 'elToString', "Fetching outerHTML from '#{el}'."
    return el.outerHTML.trim()
  else if el.innerHTML?
    log.verbose 'elToString', "Fetching innerHTML from '#{el}'."
    return el.innerHTML.trim()
