Help using :xmerl to develop a OPML library

Hi there.

I’m using :xmerl to develop a OPML library for Elixir (but might write one for Erlang as well) and I don’t quite understand the result that :xmerl.scan(data) gives me.

Does anyone have an easy to understand article or book that explains Erlang’s XML comprehension well? I’m struggling to understand it so far.

Thanks!

It should be returning an xmerl scan record as I recall, so you could load that record format. :slight_smile:

Does this gist help you?

Ah yep, that hrl file contains the records. Look at Elixir’s Record module to see how to bring it in. :slight_smile:

Your answer kind of helped me. I think I need to do some more research at the moment. Right now, I’m finding the output from :xmerl_scan.string(xml_data) very verbose, and I’m getting a bit overwhelmed by it.

Thanks for your help, though! I appreciate it. :thumbsup:

1 Like

Well, you get an full representation of the xml in erlang terms. In xmerl there should be proper tooling to query and iterate that structure.

1 Like