A few weeks ago I had to write a JAXB bindings file, this is an xml file that describes customizations to Java xml bindings. I started by just typing these in by hand, but then quickly realized how painful it was becoming. Since I was faced with creating a fairly large bindings file, I had to come up with a better way to do this. I decided to use Visual Studio to create this file with Intellisense. To enable intellisense your xml file must have an xmlns namespace specified. This is how Visual Studio matches the file you are creating with the correct xsd file to drive Intellisense. Since Visual Studio obviously doesn't ship with the xsd for JAXB bindings files, I had to find it. I don't remember where I found it, but it is at the bottom of this post for your convenience. You simply place the xsd file in the directory: %Program Files%Microsoft Visual Studio 8\Xml\Schemas
You may have to restart Visual Studio, can't remember. But after that you should have Intellisense for the file that you are working on!

Here is an image of using Visual Studio with Intellisense for the JAXB bindings file.

I don't know if Eclipse supports anything like this. There is probably a plugin somewhere.

bindingschema_1_0.xsd (16.23 KB)

 

Sayed Ibrahim Hashimi


Comment Section






Comments are closed.