Any chart application basically displays some data, and smooth interaction of data source with charting application remains critical. In many scenarios such as stock chart showing live stock prices or line chart showing temperature variable, there is constant variation in data that is reflected by chart, and thus smooth data supply to the application is crucial.
There are different data sources to provide the application with data like database access, XML, and CSV. Out of the data source options available, the experts opine XML as the most suitable choice for Java application because of the advantages that XML offers. XML supports multilingual documents and Unicode. This is important for internationalization of applications. XML is a W3C standard, endorsed by software industry market leaders.
Also, context information is easy to evaluate as compared to HTML or plain text as the tags, attributes, and element structure provide context information that can be used to interpret the meaning of content, opening up new possibilities for highly efficient search engines, intelligent data mining agents, etc. XML documents are self-descriptive. Any XML tag can possess an unlimited number of attributes such as author or version. The XML tags can be created as needed.
Data in XML documents can be stored without needing schemas set up by a Database Administrator as they contain metadata in the form of tags and attributes. XML is especially suitable for working with unstructured data. XML facilitates the comparison and aggregation of data because of its tree structure. XML documents can embed any possible data type - from multimedia data (image, sound, video) to active components (Java applets, ActiveX). Mapping existing data structures like file systems or relational databases to XML is simple.
To summarize, XML makes it easier for Java chart applications to read, process, and output data.