XML, the Extensible Markup Language, is the preferred technology in many information-transfer scenarios because of its ability to encode information in a way that is easy to read, process, and generate. Java is an ideal companion to XML: both languages share a similar historical background (C++, SGML); both have goals of simplicity, portability, and flexibility; and both continue to be developed in groups that involve industry, development community and academia (W3C, Java Community ProcessSM). Not suprisingly Java is the overwhelmingly preferred language for server and client-side XML application development.
Java and XML are a natural match for the creation of applications that exploit the web of information where different classes of clients, from a traditional phone to the latest smart refrigerator, consume and generate information that is exchanged between different servers that run on varied system platforms. The portability and extensibility of both XML and Java make them the ideal choice for the flexibility and wide availability requirements of this new web.
Source : Site de Sun