Can Java classes be linked with XML files and then run?
What do you mean with this? XML files are text files, there is nothing in them to be linked with binary Java classes as part of compilation.
But if you mean "How can i use XML files from Java?", then you can check following tutorials:
Working with XML: The Java/XML Tutorial
Processing XML with Java