I have created a JFace treeview of an xml file, along with a data editor, and would love to dynamically validate user input (both simple and complex). At lower level document elements, calling XmlObject.validate() works great and I add a little error icon to the tree if validate() fails. However, at higher levels running validate() is very time consuming because it also validates all the subelements. Is there any way to non-recursively validate?
So basically, I want X.validate() to return true so long as 1.) All of X's elements correctly fit the content model 2.) All of X's simple elements have valid input