Forum: Ruby Attribute ordering in REXML

Posted by Uwe Kubosch (donv)
on 2012-12-03 09:15
(Received via mailing list)
Hi all!

We are using REXML to modify XML files in our project, and we experience 
that the attributes of all tags are always reordered.  For XML files 
that are checked into source control, this generates unnecessary noise.

Is there a way to either keep the ordering of the tag attributes intact 
or choose to have a predictable ordering like alphanumerical ordering?

All help is appreciated and links are gladly accepted :)
Posted by Robert Klemme (robert_k78)
on 2012-12-03 09:40
(Received via mailing list)
On Mon, Dec 3, 2012 at 9:14 AM, Uwe Kubosch <uwe@kubosch.no> wrote:
> Hi all!
>
> We are using REXML to modify XML files in our project, and we experience that 
the attributes of all tags are always reordered.  For XML files that are checked 
into source control, this generates unnecessary noise.
>
> Is there a way to either keep the ordering of the tag attributes intact or 
choose to have a predictable ordering like alphanumerical ordering?
>
> All help is appreciated and links are gladly accepted :)

https://www.google.de/search?q=rexml+attribute+ordering

->

http://stackoverflow.com/questions/574724/rexml-pr...

Cheers

robert
Posted by Uwe Kubosch (donv)
on 2012-12-03 18:23
(Received via mailing list)
On 2012-12-03, at 09:39, Robert Klemme <shortcutter@googlemail.com> 
wrote:

> On Mon, Dec 3, 2012 at 9:14 AM, Uwe Kubosch <uwe@kubosch.no> wrote:
>>
>> We are using REXML to modify XML files in our project, and we experience that 
the attributes of all tags are always reordered.  For XML files that are checked 
into source control, this generates unnecessary noise.
>>
>> Is there a way to either keep the ordering of the tag attributes intact or 
choose to have a predictable ordering like alphanumerical ordering?
>>
>> All help is appreciated and links are gladly accepted :)
>
> https://www.google.de/search?q=rexml+attribute+ordering
> http://stackoverflow.com/questions/574724/rexml-pr...


Thanks!  That did the trick.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.