26 Jun 2013, 21:45
Picture_1_pragsmall

Fabio Henrique Mazarotto (2 posts)

How to write

[ #xmlText{value=Rank} ]  = xmerl_xpath:string("//SalesRank/text()", Xml)

in Elixir? I think I didn’t get it right when I read the records chapter.

*from Dave Thomas’s blog ‘A First Erlang Program’ (2007)

27 Jun 2013, 20:23
Picture_1_pragsmall

Fabio Henrique Mazarotto (2 posts)

Found it in elixir’s site: must use Record.extract to import Erlang’s record.

defrecord :xmlText, Record.extract(:xmlText, from_lib: 'xmerl/include/xmerl.hrl')
  You must be logged in to comment