Attributes of xml elements – Apple Final Cut Pro 5 User Manual
Page 1516
Chapter 12
Importing and Exporting Final Cut Pro XML
165
II
XML was designed to be extensible—you can define any tags and hierarchical rules
that fit the data you are working with. For example, an XML file that contains store
inventory data might have elements such as <product>, <manufacturer>, <cost>, and
<size>. An XML file that contains video editing information would have very different
elements, such as <clip>, <name>, <duration>, <logginginfo>, and so on.
XML is a strict markup language, which means all tags must be closed. For example, if
your XML document contains a <clip> tag, there must be a corresponding </clip> tag
to close the element. Unclosed tags create errors.
Attributes of XML Elements
Some elements contain identifying information called attributes. In XML, an element’s
attribute looks like this:
<font color=”red”>
...
</font>
In the example above, the font element has an attribute called color, which is set to
“red”. Alternatively, you could choose to structure your XML format without attributes,
such as
<font>
<color>red</color>
...
</font>
Just as XML tags are extensible, so are attributes. When you define the rules of your
XML file, you can allow elements to have any attributes you want. For example, in the
Final Cut Pro XML Interchange Format, every clip can have an “id” attribute so each clip
can be uniquely identified and referenced:
<clip id=”coffee house 1”>
...
</clip>
<clip id =”coffee house 2”>
...
</clip>