A simple Erlang DSL for generating XML based on tuples of tuples
Erlang
Latest commit 0bae81a Nov 2, 2012 @devinus Support empty nodes
Permalink
Failed to load latest commit information.
src Support empty nodes Nov 2, 2012
.gitignore Initial import May 3, 2012
Makefile Initial import May 3, 2012
README.md Description fix May 3, 2012
rebar Initial import May 3, 2012
rebar.config Initial import May 3, 2012

README.md

Jorge

Jorge (pronounced HOR-HAY) is a simple Erlang DSL for generating XML based on tuples of tuples.

Example

1> Foo = {foo, [{grault, garply}, {waldo, fred}],
1>     {bar, [
1>         {baz, 2},
1>         {quux, corge},
1>         {plugh, 5.0},
1>         {xyzzy, <<"thud">>},
1>         {spam, fun() -> eggs end}
1>     ]}
1> }.
{foo,[{grault,garply},{waldo,fred}],
     {bar,[{baz,2},
           {quux,corge},
           {plugh,5.0},
           {xyzzy,<<"thud">>},
           {spam,#Fun<erl_eval.20.82930912>}]}}
2> jorge:jorge(Foo).
[<<"<foo grault=\"garply\" waldo=\"fred\">">>,
 [<<"<bar>">>,
  [[<<"<baz>">>,<<"2">>,<<"</baz>">>],
   [<<"<quux>">>,<<"corge">>,<<"</quux>">>],
   [<<"<plugh>">>,<<"5.0">>,<<"</plugh>">>],
   [<<"<xyzzy>">>,<<"thud">>,<<"</xyzzy>">>],
   [<<"<spam>">>,<<"eggs">>,<<"</spam>">>]],
  <<"</bar>">>],
 <<"</foo>">>]