Appendix B. XML Primer

Ant build files are written in XML, so Ant users must understand the language. Here’s a brief introduction to basic XML.

Extended Markup Language (XML) provides a way of representing structured data that’s somewhat readable by both humans and programs. It isn’t the easiest of representations for either party, but it lets people write structured files that machines can parse. The strength of XML is that many tools can work with the XML without knowing what the final use is. Once you’ve learned XML, you can recognize and navigate almost any XML document.

XML documents should begin with an XML prolog, which indicates the version and, optionally, the encoding of the XML file—usually the string <?xml version="1.0"?>. Next ...

Get Ant in Action 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.