If you already know
Java and want to start up with XML (from the beginning), I recommend "Java and XML" from O'Reilly, authored by Brett McLaughlin (ISBN 0-596-00016-2). It really starts from the beginning and is written for Java programmers. The book's web site is:
http://www.oreilly.com/catalog/javaxml/ You can "run" XML in your browser directly if yo are using IE5. It has built-in rendering of XML documents, and can automatically apply style sheets. This is really only valuable if you are building intranet applications where you know your users are using IE5. A more common (and better) scenario is to have some server process take your XML document and transform it into HTML for your clients.
If you don't have the ability to transform the documents on the server on the fly, you can simply batch-process come XML documents and generate static HTML pages from them. For example, you could have the content for your web site in XML documents, and easily change your site's look and feel by altering your XSL style sheet, then process your XML files against the new style sheet. You then just publish the new files. I have done this before and I think it works great.
The only link I know of between XML and EJB is that the deployment descriptor for your EJB is an XML document. Most reputable EJB servers have some sort of "wizard" to generate this for you, but will still allow you to edit.
Hope this helps,
Bill