I’ve got a confession to make. My current client is a Java shop, not a .Net shop. Now, I’m “only” doing XML work here, so I don’t really have to do much Java coding, but knowing how the platform works is very important to creating an easy to use XML architecture. One of the first gotchas I ran across is the poor support for XML serialization in the Java framework. It isn’t nearly as advanced as the .Net framework when it comes to XML serialization, and attribute based programming. To fill this niche, there are a bunch of open source libraries out there. I’ve looked at a bunch of them, but since most of the Java coders out there haven’t taken a look at the .Net framework, they haven’t taken the time to learn how .Net does it, and adapt it (and/or improve it) for Java. The closest library I’ve come across to the .Net style of XML serialization is XStream (thanks to this Xml.com article). It does use reflection to help serialize the Java Objects (like in .Net), but the major thing it is lacking is the ability to control the serialization thru attributes (which .Net does do). Instead, you have to add this information to your procedural code as settings via the alias method.
Now if I can only get an open source project going to implement an XPathNavigator-like library on the Java framework, maybe we can get some synergy between the Java and .Net XML developers.