Lesson 1: Anatomy of a CAP Alert Message
XML Elements
As shown in the document object model on the previous page, a CAP alert message is constructed using XML element tags. Here is an example of the XML that makes up a CAP flood alert. The colors indicate the various groupings of the elements as shown in the document object model.
Recall that in XML each element has two parts:
-
Opening and closing tags with a name (e.g., <cap:sender></cap:sender>)
-
A value: the information contained within the tag (e.g., "meteo.rwanda@gmail.com")
Athough it is possible to author CAP alert messages using a simple text editor, that is not a practical approach. Writing XML manually is tedious and it is easy to introduce errors into its very structured format. This is especially true when dealing with the time constraints of getting an alert authored and published. Most likely, you will author alerts within a forecast monitoring system, a hazard alerting tool, or a web-based application. The tool will take care of creating the properly structured XML and make it available to the end user through a news feed or other means.