-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve attribute order && Keep Tags minimized #2735
Comments
Imported From: https://issues.scala-lang.org/browse/SI-2735?orig=1 |
Steven Bethard (bethard) said: |
Silvio Bierman (silviobierman) said: |
Steven Bethard (bethard) said: https://groups.google.com/d/topic/scala-internals/eoTgKU8MGo4/discussion |
Silvio Bierman (silviobierman) said: To be honest, although the API is a bit odd at places scala.xml suits most of my needs. If only this issue would be fixed I would be quite happy to keep using it. If I had to guess I would think it would take little more than replacing a HashMap with a LinkedHashMap or something like that. Is this issue currently assigned to anyone at all? |
@khernyo said: |
Steven Bethard (bethard) said: |
@khernyo said: So, the only real change in xml-attribute.scala is the last five lines. |
Steven Bethard (bethard) said: |
@acruise said: |
David Portabella (dportabella) said: |
I have to automatically create a lot of JNDI environment variables like the following:
Now no matter what I do, Scala will always put the "name" attribute last, i.e. change attribute ordering and also expand my empty tag. I searched the mailing list for a solution to the expanding problem, but in Snapshot 2.8.0 there doesn't seem to be an easy one. The end result is this:
Now I'd love to have the attribute order preserved, as scanning variables (with my human eyes :) ) by the "name" attribute in a jndi config file is a very common thing to do. I can live with the tag expansion, even though it adds a bit of bloat and wonder why Scala expands my empty tag in the first place: I would write down the expanded version if I wanted to.
Thanks guys!
The text was updated successfully, but these errors were encountered: