The XML File Structure
This article basically shows how to generate bar/column charts using an extensible stylesheet template and an XML source file.
For our example, we will use fictitional sales data from ACME Sales department.
- The
text
attribute basically identifies the field labels while
- The
value
attribute identifies the field values
- Each record shows the product and the total sales for that year
Our XML file looks like the file structure below:
<?xml version="1.0" ?>
<root text="1" value="2">
<title>ACME Profits for 2000</title>
<headers>
<header>Product</header>
<header>Sales</header>
</headers>
<records>
<record>
<field>Gold</field>
<field>10000000</field>
</record>
<record>
<field>Platinum</field>
<field>11000005.95</field>
</record>
...
</records>
</root>
Our goal is to create a bar chart that looks like the screen shot above