in reply to Re: RFC: XML::Composer
in thread RFC: XML::Composer

Any XML generator module that you use will have the same problem with regard to tag ordering. If you need to get tag a and then tag b in the right order, it's really up to you to do that. Usually, the best way is a small wrapper library on top of whatever XML generator you're using. As to which one, I have to point out XML::Genx, which I wrote (well wrote the XS interface anyway). It's very, very careful about making damned sure that you don't end up with non-well-formed XML. That means that you'll either produce parseable XML, or get an exception. If you make it produce non-well-formed XML, it's a bug. -Dom

Replies are listed 'Best First'.
Re^3: RFC: XML::Composer
by Ovid (Cardinal) on Sep 30, 2005 at 22:46 UTC

    I just modified my code so that attributes are passed in an array reference instead of a hash reference, thus preserving attribute order.

    Update: I modified it again so it takes either a hashref or an arrayref.

    Cheers,
    Ovid

    New address of my CGI Course.