Skip Menu |

This queue is for tickets about the XML-Bare CPAN distribution.

Report information
The Basics
Id: 47909
Status: resolved
Priority: 0/
Queue: XML-Bare

People
Owner: cpan [...] codechild.com
Requestors: nigel.metheringham [...] Dev.intechnology.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.43
Fixed in: 0.44



Subject: XML reconstructed does not respect ordering
When reconstructing a set of XML from the parse tree of some input XML, ordering of both attributes and tags are not currently preserved. [This can be seen in the commented out tests in the utf8 bug report/patch] Fixing the tag ordering ought to be relatively easy - it looks like something just got broken within obj2xml (which looks like it has issues since the parameters passed into it from the xml function are inappropriate too (pad should not be a number)). Fixing attribute ordering (which might not be thought appropriate since ordering should not be vital) would require _pos values to be attached to the parse tree for each attribute.
You are correct that that the ordering is not respected. It should be though; the docs state that it is. The _pos values -are- stored correctly, the code to sort by them was broken though. It has now been resolved in version 0.44. Note also that the test code you are using has self closed nodes of the following format. "<node />" Personally I prefer "<node/>", but others seem to prefer the format you used, so I am sticking with what you used. Self closed nodes are now supported in version 0.44. Also there was an issue with extra spacing at the beginning of output xml. That is resolved now as well.