ClojureDocs

Nav

Namespaces

parse

clojure.xml

Available since 1.0
  • (parse s)
  • (parse s startparse)
Parses and loads the source s, which can be a File, InputStream or
String naming a URI. Returns a tree of the xml/element struct-map,
which has the keys :tag, :attrs, and :content. and accessor fns tag,
attrs, and content. Other parsers can be supplied by passing
startparse, a fn taking a source and a ContentHandler and returning
a parser.
 Prior to 1.11, used startparse-sax by default. As of 1.11, uses
startparse-sax-safe, which disables XXE (XML External Entity)
processing. Pass startparse-sax to revert to prior behavior.