                  lowercase true
                  position true
                  strict-entities false}}]
-   (let [parser (.parser js/sax strict (clj->js {"trim" trim
-                                                 "normalize" normalize
-                                                 "lowercase" lowercase
-                                                 "xmlns" xmlns
-                                                 "position" position
-                                                 "strictEntities" strict-entities}))
+   (let [parser (.parser js/sax strict #js {"trim" trim
+                                            "normalize" normalize
+                                            "lowercase" lowercase
+                                            "xmlns" xmlns
+                                            "position" position
+                                            "strictEntities" strict-entities})
          document (atom (new-document))
          result (atom nil)]
      ;; OPEN TAG

      (conj (rest document) new-node-value))
    document))

(defn- format-document [document]
  (first document))

(defn xml->clj

     (.close parser)

     (or (:success @result)
         (throw (ex-info (str (:error @result)) {}))))))
