Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: RFC: XML::Composer

by Anonymous Monk
on Sep 30, 2005 at 22:16 UTC ( #496535=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496535]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2020-05-31 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?