XML Summary

Apache Ant · Wikibooks

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From Wikibooks, under CC BY-SA 4.0, as the source states it. This page at Wikibooks.

    XML Summary

    Brief Overview of XML

    This chapter has a summary of the things you need to know about XML to use Apache Ant. It is not a lot of information and users that are already familiar with HTML will pick up the concepts very quickly.

    You do not need to know a lot about XML to use Ant. Just a few syntaxical items.

    First, you must be very careful to match up the "begin" and "end" tags. Begin tags start with a "<" and end tags have the same name but start with a "</". Here is an simple example:

      <MyDataElement>
         Data Inside...
      </MyDataElement>
    

    Train your eye to look for the </ that ends a tag. If it does not match up something is wrong. Tags that do not match up will cause errors.

    Data Element Nesting

    All XML Data Elements must be paired using matching start and end tags:

      <Parent_XML_Element>
         <Child_XML_Element>
            <Sub_Child_XML_Element>
            </Sub_Child_XML_Element>
         </Child_XML_Element>
      </Parent_XML_Element >
    

    Understanding this paired nesting structure is critical to creating working Ant build files.

    XML Attributes

    The XML begin tag may also have attributes.

      <MyTag attribute1="nothing" attribute2="nothing else">Text</MyTag>
    

    Next Section

    Getting Started