Hi Johnson, I understand that it is not specified in the XML specification and it is not a requirement generally. But in languages like Java using Xerces, the xml is generated with attributes in the sequence you have created it. So just trying to find if there is any way to over come this issue. I already have an alternative of constructing the xml as a string in the sequence of attributes I need. But this is an ugly approach and trying to find if there is any other alternative. I also checked with REXML and it has the same behaviour as Builder. Thanks Arun -- Posted via http://www.ruby-forum.com/.