views:

32

answers:

1

I am trying to write an eclipse plugin that will show errors in the gutter on the left side of the editor when someone types data into my xml file that is not valid.

This is basically like a compiler would do for a language.

I can't seem to find any documentation out in the world that suggests how to do this. Any help would be greatly appreciated.

Thanks

A: 

Well, I'm not sure about eclipse, but I've always used DTD or XML schaema to validate XML documents. The Java SAX parser supports both of these and you can define your markup language in either format and have the SAX parser tell you all the errors. Presumably it's then just a question of putting those errors into the eclipse plugin.

Benj
Yes, this is the ideal way to just verify an XML document. However, this post is asking for help with something eclipse platform specific.Let me give you an example. Suppose that your XML file is for accessing and converting database columns into something else. Your database credentials are in the document. You want to verify that the columns match up properly, which you can do because you have the info you need in the XML doc.Just how you would have a lil red icon in the gutter while editing a java file, I would like to do the same thing.
Eric Anderson