This thread is my first introduction to "aXML". I presume the "definitive" reference would be here, which makes it look like a commercial product (first warning signal) with an obvious MS/ASP/.NET focus (another yellow flag). If this is one of those "extensions" to XML syntax -- intended to give the buyer "special powers" not conferred on those who insist on compliance with openly agreed-upon standards -- it is a misguided pursuit.

That said, how is it possible that angle brackets can be embedded in an attribute value, without being converted to  < > ? Is that prudent? And why would a "qd" entity be embedded immediately inside another "qd" entity? And why would there be up to three different ways of bracketing this "qd" sort of thing (whatever it is)?

And what does this have to do with Perl?

Update: Sorry -- I over-reacted there. Seeing the perl part of the question:

axml string:
<link action="<qd><qd arg="(qd)ref3(/qd)">ref2</qd></qd>">[qd]ref[/qd] +</link>
How could one obtain the result:
<a href="action.pl?action=someaction">a link</a>
using conventional cpan modules?
I guess Text::Balanced might be a way to start, but really, you might just have to go straight to Parse::RecDescent. But I'm not sure you've given enough of the "motivating principles" to clarify what it is you really need. Based on what I understand from the OP, this would do it:
s{<link action=<qd>.*?</link>}{<a href="action.pl?action=someaction">a + link</a>};
That goes against the PM grain of using XML parsing modules when parsing XML, but this doesn't really look like XML, so why worry about it?

In reply to Re: Transforming axml into hyperlinks by graff
in thread Transforming axml into hyperlinks by simonodell

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.