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.
It should be returning an xmerl scan record as I recall, so you could load that record format.
Ah yep, that hrl file contains the records. Look at Elixir’s
Record module to see how to bring it in.
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.
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.