L
Lance Pollard
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:
<node id="name" property="value"/>
not this:
<node property="value" id="name"/>
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
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:
<node id="name" property="value"/>
not this:
<node property="value" id="name"/>
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