ryoakg
4/28/2016 - 9:32 AM

xpath-predicate-has-class.clj

(defn- xpath-predicate-has-class?
  "Makes XPath predicate whether a element has the specified class."
  [class]
  (format "contains(concat(' ',normalize-space(@class),' '), ' %s ')"
          class))

;; (format "//*[%s]" (xpath-predicate-has-class? "clearfix"))