DTD for Ant build.xml in Eclipse

I’ve seen this validation error in Eclipse for a few releases and finally got tired enough of seeing it that I did some research.

The simplest method to silence the warning is to add a DOCTYPE to the build.xml files, between the XML declaration and the project, there are a few more complicated methods, but this one works well for the cases I’ve experienced.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project name="Example"...>

REFERENCES:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.