in reply to Re: XML::Mini problem
in thread XML::Mini problem

Ah, I don't know it's some XML parser that requires it that way. Anyway, I was able to fix it in Header.pm, there is a sort on the attributes in the sub toString() which can be removed.
foreach my $atName (sort keys %{$self->{'_attributes'}})
Now it works great.

Replies are listed 'Best First'.
Re^3: XML::Mini problem
by GrandFather (Saint) on May 25, 2007 at 11:00 UTC

    That's a rather fragile fix that most likely ultimately depends on the order the keys/values are returned for a hash. Were it me I'd be more inclined to edit the XML document after it's been generated by XML::Mini to avoid issues that may arise with different versions of Perl, the module, other modules that may be used, the specific attributes that are used or even the manipulation history of the hash used to store the attributes.

    If there is any requirement for reliability in the system that uses your code I'd seriously consider alternative solutions that don't rely on implementation details of code that you have no control over (such as Perl's hash management).


    DWIM is Perl's answer to Gödel