From: Vyacheslav Karamov <[EMAIL PROTECTED]> > I'm parsing XML using XML::Parser::Expat > > ... > $self->{parser}->setHandlers( > Start=>\&OnStartElement, > End=>\&OnEndElement, > Char=>\&OnCharacters); > > ... > sub OnStartElement > { > my $parser = shift; > my $el = shift; > %attrs = shift if @_ > 2; > ... > } > > In %attrs parser stores XML tag attributes names and values. > After some processing I need to store tags and attributes back to XML. > But how could I preserve attributes order? > > So, first I need to save attributes in array in order to save order? > How can I do it?
Why? The order of attributes doesn't matter. That is as long as it's XML ... if something cares about the order of attributes it's not parsing XML. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/