[erlang-questions] Erlang and XML.
Dan Rubino
webaccounts@REDACTED
Thu Oct 16 22:38:39 CEST 2008
Hi all,
Been having a dabble with XMErl today. I am using Erlang on the server
side to query an in-memory database via ODBC.
As I am sure most of you know when you query a DB via ODBC in Erlang you
get a structure something like this back:
{selected, ColumnNames, Rows} = ...
Where ColumnNames and Rows are of course lists. What I would like to do
is convert these list into a very simple XML structure which I can
return to a Java based client for easier processing.
So something simple like the following for example (don't worry about
col ordering):
<?xml version="1.0" ?>
<result>
<cols>
<col></col>
</cols>
<rows>
<row><value></value></row>
</rows>
</result>
Having looked at XMErl there doesn't appear at first glance to be an
easy and generic way in which I can do this.
I am sure its something commonly done - any ideas?
Many Thanks,
Dan
More information about the erlang-questions
mailing list