OK then, we have isolated the problem a little bit. If the listing shows the fields as upper case, then you know it's happening during the compile. You can pretty much ignore the XML workings until you figure the compile part out.
If you look at your source code, are the fields still lower case? (Nothing in your editor changed them) If you are moving the source code before the compile, check there too.
If you compile a small, simple program with mixed case field names, do they also get converted to upper? (remove all XML calls)