Java is a programming language invented and managed by Sun Microsystems. Its a way for humans to easily write code that computers can understand, which means its a "High Level" programming language. Java is perhaps most famous for its ability to be simply run on many different computing platforms, from PCs and Macs to mobile phones.
XML is simply a widely used system to very specifically organize data in a way that is unambiguous for machines to read and simple for humans to understand and write. It is NOT a programming language, but rather a standard for information exchange. If you are familiar with web code, its a bit like HTML except that instead of having the <...> tags agreed upon ahead of time, each new implementation of xml specifies its own tags.