Fork me on GitHub
#clojuredesign-podcast
<
2019-12-21
>
mmeix10:12:14

From reduce to reducers to … ? The suspense ist killing me! 😋

mmeix10:12:35

Thanks for yesterday’s Episode!

mmeix11:12:11

ad hoc: what is the preferred way to consume xml into Clojurescript? (while waiting for “XML! XML! XML!” 😁 )

nate16:12:54

@mmeix glad to hear you're enjoying the series. It's been a fun one to record.

nate16:12:55

And for reading xml in cljs, I haven't had to do that myself, but I'd probably start with https://github.com/funcool/tubax, looks promising.

mmeix16:12:04

Thanks, will try

adamfeldman20:12:13

Specter and similar tools can help if you need to query and/or transform the XML after you read it in https://github.com/redplanetlabs/specter

adamfeldman20:12:52

For something a bit lighter than Specter: https://vvvvalvalval.github.io/supdate/

Bobby Towers00:12:59

Tubax worked great for me locally but didn't survive deployment. Tried using sax-js directly and also gave up. Then I found "node-xml-lite", which partially works (couldn't read a file, but can pass it a string at least). But wait... there's a cljs port of clojure.data.xml, so what's the problem? Dunno, but that didn't work for me either. Perhaps I'm missing something really silly. Gonna try this next: https://google.github.io/closure-library/api/goog.dom.xml.html

Bobby Towers00:12:41

Like clojure/data/xml.cljs, it uses the browser object's DOMParser.

nate00:12:17

Oh wow. What happened to Tubax?

Bobby Towers00:12:45

There's an open issue about it not compiling with shadow-cljs, with instructions kindly given to fix it, but I tried it without luck

nate00:12:00

Ah, interesting. Thanks for passing along that info.

Bobby Towers00:12:18

Thanks for the inspiration! My favorite part of working with XML is making it not-XML

nate00:12:10

Hahaha. So true. Can't wait to make it "just data".

mmeix11:12:20

meander looks really interesting …

Bobby Towers11:12:42

Yes, I've been wanting to find some excuse to use that for awhile...

mmeix11:12:39

I see possibilities to use this in transforming (internal) music structures