2011年10月20日 星期四

[Erlang] Simple sample to parse XML by xmerl

XML:
<Bookstore>
  <Book>
    <ISBN>9781401309657</ISBN>
    <Name>The Last Letcture</Name>
    <Author>Randy Pausch</Author>
  </Book>
</Bookstore>
Code: Result:
[{'ISBN',"9781401309657"},
 {'Name',"The Last Letcture"},
 {'Author',"Randy Pausch"}]
Related Posts Plugin for WordPress, Blogger...