Well, perhaps I should have been more specific. The idea I had in mind was that you would use one of these (or their XML cousins) to process your various data. Callbacks or the equivelent would trigger the XML writer to spit out a duplicate tag. As I said shouldnt be too difficult to code. My experience with
HTML::Treebuilder suggests that you could use
XML::Treebuilder and the function look_down with a code ref to do a simple callback that uses
XML::Writer to achieve the desired results (and also allow you to validate the types of tag you allow to embedded).
A second approach (which I am hesitant to suggest, but you are an adult, even if an adult votebot :-) would be to use IO::Scalar as the type of OUTPUT parameter. That way you can do whatever you want to the string involved with little/no worry about what XML::Writer does behind doors.
Still, I think I would go with the callback if only out of sheer paranoia and future flexibility.
Yves / DeMerphq
--
Have you registered your Name Space?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.