         nodes (.evaluate xpath query-string isource XPathConstants/NODESET)]
     (->> (.getLength nodes)
          (range 0)
-         (mapv #(street-segment-node->map (.item nodes %))))))
+         (mapv #(street-segment-node->array (.item nodes %))))))
 
 (defn copy-to-temp-file
   [resource-path]

   [javax.xml.xpath XPathFactory XPathConstants]
   [org.xml.sax InputSource]))

(defn append-node-to-map
  [nodes m idx]
  (let [item (.item nodes idx)]
    (assoc m (xml-name->keyword (.getNodeName item)) (.getTextContent item))))

(defn street-segment-node->map
  [node]
  (let [ss-nodes (.getChildNodes node)]
    (->> ss-nodes 
         .getLength
         (range 0)
         (reduce (partial append-node-to-map ss-nodes) {}))))

(defn xpath-query
  [filepath query-string]

              {:keys [xml-output-file]} (ss/process-xml
                                         {:xml-output-file (.toPath output-file-copy)
                                          :input input-files})
              nodes (xpath-query (.toString xml-output-file) "/VipObject/StreetSegment")
              nodes-as-maps (map #(into {} %) nodes)]

          (is (= 2 (count nodes)))
          (is (= #{"p001" "p002"} (set (map :precinct-id nodes-as-maps))))
          (is (= #{"20001" "20002"} (set (map :zip nodes-as-maps))))
          (is (= #{"DC"} (set (map :state nodes-as-maps))))
          (is (= #{"Delaware" "Wisconsin"} (set (map :street-name nodes-as-maps))))
          (let [children-keys (->> nodes first (map first))]
            (is (well-ordered-children? children-keys) (pr-str children-keys)))
          (let [children-keys (->> nodes second (map first))]
            (is (well-ordered-children? children-keys) (pr-str children-keys)))))

      (testing "Catches bad street segments, including those with missing
              required fields and non-existent precinct-ids"
