There are times when I want to take an axe to Eclipse. Today’s particular grief is due to the XML editor. There are numerous faults with it (one of the biggest is that it ‘captures’ the control-pgup and control-pgdn keys into local tabs, so if you have an XML file open, and you use the keystrokes to navigate through your files, when you switch tabs to an XML file, the only way you can view a different file is to click on it), but todays stabbity-stab comes from the validator.
Eclipse shows you errors and warnings in realtime. Usually, they’re fairly accurate. Today I was editing a struts.xml file, and was getting a validation warning. When Eclipse senses a problem with the XML (based on it’s DTD), it tells you “this XML file fails the DTD validation”.
But it doesn’t tell you where.
This completely baffles me. “Somewhere in the following several hundred lines of XML code, there’s a problem. But I won’t tell you where or what it is.”
Off to the W3.org Validation service. I fed the XML file into it, and lo! A detailed description of the problem, and where it was:
Line 26, Column 39:
document type does not allow element "include" here.<include file="struts-editevent.xml"/>
Was that really that difficult?