[erlang-questions] ErlTl question

Salonee Sinha Roy <>
Sun Feb 8 20:43:12 CET 2009


I am trying to use an ErlTL template to generate Xml strings.

My template is a follows.

<%! This template prints a sample XML %>
<%? {Title} = Data %>
<test_xml>
<% XML_Elem %>
</test_xml>


I render this template using the following command

erltl:compile("xml.et").
xml:render({<<"Test">>}).

which returns
[<<"\n<test_xml>\n">>,<<"Test">>,<<"\n</test_xml>\n">>]

How do I use this to generate the xml string "<test_xml>Test</text_xml>". I
dont really care about the white space. It can remain in the final xml
string.

I would really appreciate help with this.

Thanks

Salonee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090208/ec91b220/attachment.html>


More information about the erlang-questions mailing list