Many here are bound to be familiar with TT2, so to illustrate aXML a bit more clearly it might be helpful to make a bit of a comparison between the two.

listing of a TT2 template ------------------------- [% INCLUDE header title = 'User Info' %] [% USE DBI('dbi:mSQL:mydbname') %] <table border=0 width="100%"> <tr> <th>User ID</th> <th>Name</th> <th>Email</th> </tr> [% FOREACH user IN DBI.query('SELECT * FROM user ORDER BY id') %] <tr> <td>[% user.id %]</td> <td><a href="action.pl?action=user_profile&user_id=[% user.id %]"> +[% user.name %]</a></td> <td>[% user.email %]</td> </tr> [% END %] </table> [% INCLUDE footer %] The equivalent in aXML ---------------------- <inc title="User Info">header</inc> <table border=0 width="100%"> <tr> <th>User ID</th> <th>Name</th> <th>Email</th> </tr> <db_select> <query> SELECT * FROM user ORDER BY id </query> <mask> <tr> <td><d>id</d></td> <td>[hlink action="user_profile" user_id="<d>id</d>"]<d>name</d> +[/hlink]</td> <td><d>email</d></td> </tr> </mask> </db_select> </table> <inc>footer</inc>

As I'm sure you can see, there are clear similiarities between the two, however this example doesn't use many of aXML's more advanced features and capabilities. As you get into greater complexity than this, the two systems begin to diverge in terms of how they work, and how they are extended. Also the functionality of aXML is not set in stone by the parser, since all the symbols are defined as plugins which can be modified or overloaded as the end programmer desires to produce any result required.

If anyone would like me to translate more examples, please post them below, the more complex the better as it will show the differences and advantage of aXML more clearly.


In reply to aXML vs TT2 by Logicus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.