Clojure wrapper around Java Rome tools. https://github.com/igrishaev/remus
Rome options:
lenient
: a boolean flag which makes Rome to be more loyal
to some mistakes in XML markup;
encoding
: a string which represents the encoding of the feed.
When parsing a URL, it comes from the Content-Encoding
HTTP header.
Possible values are listed here:
https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
content-type
: a string meaning the MIME type of the feed, e.g. application/rss
or something. When parsing a URL, it comes from the Content-Type
header.
Clojure wrapper around Java Rome tools. https://github.com/igrishaev/remus Rome options: - `lenient`: a boolean flag which makes Rome to be more loyal to some mistakes in XML markup; - `encoding`: a string which represents the encoding of the feed. When parsing a URL, it comes from the `Content-Encoding` HTTP header. Possible values are listed here: https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html - `content-type`: a string meaning the MIME type of the feed, e.g. `application/rss` or something. When parsing a URL, it comes from the `Content-Type` header.
(parse-file path & [opt-rome])
Parse a feed from a file. Path is a string referencing a file on disk.
Parse a feed from a file. Path is a string referencing a file on disk.
(parse-http-resp http-resp & [opt-rome])
Parse an HTTP response produced by the clj-http
client
(aleph.http
might also work). Most of the Rome flags
come from the HTTP headers, but you may redefine them
in the opt-rome
map.
Parse an HTTP response produced by the `clj-http` client (`aleph.http` might also work). Most of the Rome flags come from the HTTP headers, but you may redefine them in the `opt-rome` map.
(parse-stream stream & [opt-rome])
An utility function used as a bottleneck for parsing a file, URL, etc.
An utility function used as a bottleneck for parsing a file, URL, etc.
(parse-url url & [opt-http opt-rome])
Parse feed from a URL. Returns a map of the :response
and :feed
keys so you can access the response, e.g.
to save some of the headers.
The feed will only be parsed when the HTTP status is 200
and the content type is XML-friendly (see the possible values
in the remus.http
namespace).
The opt-http
parameter is a map of clj-http/aleph
options
which gets merged with the defaults. The :as
parameters always
becomes :stream
to reuse the parse-stream
function.
Parse feed from a URL. Returns a map of the `:response` and `:feed` keys so you can access the response, e.g. to save some of the headers. The feed will only be parsed when the HTTP status is 200 and the content type is XML-friendly (see the possible values in the `remus.http` namespace). The `opt-http` parameter is a map of `clj-http/aleph` options which gets merged with the defaults. The `:as` parameters always becomes `:stream` to reuse the `parse-stream` function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close