{sections}

 

{lessontitle}

1.5 Basic XML Review

CHPS uses XML to structure the configuration files affecting nearly all aspects for the forecasting system from appearance to data ingest and display.

XMLXML stands for eXtensible Markup Language. An extensible language does not require use of standard tags, so programmers can create their own.

XML is a markup language much like HTML. It does not replace HTML. It was designed to carry data, not to display data. In other words, XML does not DO anything without software to send, receive, or display it.

Basic Syntax

The basic components in XML include elements, attributes, and values.

An element has an opening tag <elementnamehere> and is the most basic unit of a document. It can contain text, attributes, and other elements. The name should describe the purpose and contents. The same name is used in the closing tag (which is similar to HTML) </elementnamehere>.

Elements can further be divided into root elements, and sub elements.

Attributes are description within an element’s opening tag. The quotation mark delimited values further describe the purpose and content of a particular element. An element can have as many attributes as needed, as long as each attribute has a unique name. Attributes are expressed in the following way:

<element attribute="value">content</element>

Values further describe the purpose and content of an attribute. Values are denoted using double quotation marks and follow an attribute separated by an equal sign.

The following image breaks down the CHPS code into elements.

Basic Syntax

Click here to view a presentation about XML syntax.
Note: This presentation opens in a new window or tab.