From: Lance Pollard Date: 2009-09-25T06:08:14+09:00 Subject: Ordering XML Attributes with Hpricot? Hey, Is there a way to organize/print out the xml attributes using Hpricot, or do I have to run through the xml file again and replace patterns? I would like to be able to say "put this attribute first, put this attribute next ...", so I can say, I want this: not this: Since the attributes are kept in a hash there's no order to them, so they appear in seemingly random order, but it's the same random order consistently. Any ideas how to do that? And is there a way to say "after two attributes, make a new line". So I can print out xml that can be edited by humans like code. Thanks, Lance -- Posted via http://www.ruby-forum.com/.