XML (eXtensible Markup Language) is meta-markup language that can be used to describe anything from data in a database, to word-processing documents, to (as you will soon see) graphs and charts. Its versatility, uniformity, and ease of use has led to its rapid acceptance as the standard for information sharing.
PopChart Server 4.0.5 provides extensive support for XML Data and appearance files. Additionally, almost all of the configuration files for PopChart Server are in XML. Thus, if you've been avoiding XML until now, PopChart Server may give you the perfect excuse to learn it.
There are numerous resources on the Internet that will teach you how to use XML. For that reason, this documentation does not endeavour to teach you everything about XML. Instead, we only offer a quick example to clarify the conventions and notations used in this documentation.
Example 1.2 shows a typical XML document.
Here is a brief explanation of the different parts of this XML document.
This line specifies the document type (XML), version (1.0) and encoding (ISO-8859-1). It is good practice to include this line in your XML documents, but PopChart Server does not require it.
An XML element is essentially a starting tag (e.g. <GraphData>), followed by data, followed by a closing tag (e.g. </GraphData>). Elements that do not have subelements will only have one tag with a slash at the end (e.g. <Data />).The starting tag can contain any number of attributes inside of it. The data can consist of any number of subelements.
We refer to the first element in the document as the top-level element. All other elements in the document are subelements of the top element. In PopChart XML (which is what this document is), the top element is <Chart>.
An element can have any number of attributes, all of which should be listed in the starting tag for that element. An attribute consists of the attribute name, an equals = sign, and an attribute value enclosed in quotation marks. For example, Name and Type are attributes of the Graph element.
A subelement is any element that is enclosed in another element. For example, <Data> is a subelement of <Series>.