   [c]
   (xml
    [:Collection
-    [:ShortName (value-at c "/EntryId")]
-    [:VersionId (value-at c "/Version")]
+    [:ShortName (:EntryId c)]
+    [:VersionId (:Version c)]
     [:InsertTime "1999-12-31T19:00:00-05:00"]
     [:LastUpdate "1999-12-31T19:00:00-05:00"]
     [:LongName "dummy-long-name"]
-    [:DataSetId (value-at c "/EntryTitle")]
-    [:Description (value-at c "/Abstract")]
-    [:CollectionDataType (value-at c "/CollectionDataType")]
+    [:DataSetId (:EntryTitle c)]
+    [:Description (:Abstract c)]
+    [:CollectionDataType (:CollectionDataType c)]
     [:Orderable "true"]
     [:Visible "true"]
-    [:SuggestedUsage (value-at c "/Purpose")]
-    [:ProcessingLevelId (value-at c "/ProcessingLevel/Id")]
-    [:ProcessingLevelDescription (value-at c "/ProcessingLevel/ProcessingLevelDescription")]
-    [:CollectionState (value-at c "/CollectionProgress")]
-    [:RestrictionFlag (value-at c "/AccessConstraints/Value")]
-    [:RestrictionComment (value-at c "/AccessConstraints/Description")]
+    [:SuggestedUsage (:Purpose c)]
+    [:ProcessingLevelId (-> c :ProcessingLevel :Id)]
+    [:ProcessingLevelDescription (-> c :ProcessingLevel :ProcessingLevelDescription)]
+    [:CollectionState (:CollectionProgress c)]
+    [:RestrictionFlag (-> c :AccessConstraints :Value)]
+    [:RestrictionComment (-> c :AccessConstraints :Description)]
     [:TemporalKeywords
-     (for [kw (select c "/TemporalKeywords")]
+     (for [kw (:TemporalKeywords c)]
        [:Keyword kw])]
     ;; We're assuming there is only one TemporalExtent for now. Issue CMR-1933 has been opened to
     ;; address questions about temporal mappings.
-    (when-let [temporal (value-at c "/TemporalExtents")]
+    (when-let [temporal (first (:TemporalExtents c))]
       [:Temporal
        (elements-from temporal
                       :TemporalRangeType
                       :PrecisionOfSeconds
                       :EndsAtPresentFlag)
 
-       (for [r (select temporal "RangeDateTimes")]
+       (for [r (:RangeDateTimes temporal)]
          [:RangeDateTime (elements-from r :BeginningDateTime :EndingDateTime)])
        
-       (for [date (select temporal "SingleDateTimes")]
+       (for [date (:SingleDateTimes temporal)]
          [:SingleDateTime (str date)])
 
-       (for [pdt (select temporal "PeriodicDateTimes")]
+       (for [pdt (:PeriodicDateTimes temporal)]
          [:PeriodicDateTime
           (elements-from pdt
                          :Name

                         :PeriodCycleDurationValue)])])

    [:Platforms
     (for [plat (select c "/Platforms")]
       [:Platform
        (elements-from plat
                       :ShortName
                       :LongName
                       :Type)
        [:Characteristics
         (for [cc (select plat "Characteristics")]
           (characteristic-mapping cc))]
        [:Instruments
         (for [inst (select plat "Instruments")]
           [:Instrument
            (elements-from inst
                           :ShortName

(ns cmr.umm-spec.umm-to-xml-mappings.new-echo10
  "Defines mappings from a UMM record into ECHO10 XML"
  (:require [cmr.umm-spec.xml.gen :refer :all]))

(defn characteristic-mapping
  [data]
