Syntax Errors

As is the case with conventional languages, build scripts can suffer from basic XML syntax errors. The first thing that Ant attempts to do is build project, target, task, property, and data type objects that are described in the build file. To do so, Ant uses a Simple API for XML (SAX) parser. The build will fail immediately if the SAX parser throws an exception. Consequently, you discover syntax errors one at a time. Eliminating syntax errors can be a time-consuming, tedious process. This is where an editor can help.

Several editors support the construction of XML files by color-coding different elements. Missing a quote, angle bracket, or brace (some of the most common syntax errors) should cause the editor to display elements ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.