• Share this article:

Use inferred grammar in the absence of DTD/Schema

Thursday, October 26, 2006 - 14:38 by Wayne Beaton

I’ve been meaning to blog about this little feature for a while…

The Eclipse Web Tools has a neat little feature in its XML editor. As is expected, if your XML file has a DTD or schema specified, content assist (ctrl-space) will offer suggestions as you type. More interestingly, if your XML file does not have a DTD or schema specified, content assist will still offer suggestions.

The suggestions that it offers are based on the content of the file. Here’s what it looks like in operation (just after hitting ctrl-space):If you (for whatever reason) want to turn this off (perhaps to reduce the performance hit while editing really large XML files), there is a preference setting, "Web and XML > XML Files > XML Source".

Cool features like this make me giggle like a small child…