Publication: XML Journal Publication Date: 01-JAN-04 Format: Online - approximately 2047 words Delivery: Immediate Online Access Author: Burton, Philip ; Bruhn, Russel
Article Excerpt XML is the appropriate format for semistructured data, that is, data with a natural tree structure. Trees are a special form of graphs, and a dialect of XML called GraphML now exists that provides a standard set of tags for describing them. To visualize or draw the graph we can use another XML dialect called SVG, or Scalable Vector Graphics.
SVG is a language for describing two-dimensional graphics and graphical applications and is a dialect of XML. In this article we discuss the representation of tree-structured data using XML and GraphML. We visualize the data using SVG and transform the data between the various XML documents using Extensible Stylesheet Language Transformations (XSLT).
Introduction
A graph is simply a collection of nodes and edges and may be directed or undirected. In the case of a directed graph, an arrow connects the source to the target; for an undirected graph there is no arrow, only a line. A tree is a special case of a graph: there are no closed loops or circuits but all the nodes are connected. XML documents satisfy this definition and thus exhibit a natural tree structure. Examples of trees include decision trees, concept maps, and the structure of hydrocarbon molecules.
The structure of a tree is shown in Figure 1. The rectangles are the nodes and the edges are the lines connecting the nodes. Node A is a source and targets nodes B, C, and D; similarly, source node D targets nodes E and E
[FIGURE 1 OMITTED]
The tree in Figure 1 can be represent ed in XML by a series of tags as shown in Figure 2. The nodes of the tree become tags in XML.
[FIGURE 2 OMITTED]
Alternatively, we can use a standard format like GraphML to illustrate a tree. In GraphML the tree shown in Figure 1 becomes the listing in Figure 3.
Figure 3 * GraphML
The "graph" element is the mot...
NOTE: All illustrations and photos have been removed from this article.

More articles from
XML Journal XML for client-side computing, 01-MAR-04 Leveraging XML knowledge to design, develop, and deploy speech applications: packaged apps ease the process, 01-MAR-04 Application integration: addressing the issues: one-stop shopping is not a reality, 01-MAR-04
Looking for additional articles? Click here to search our database of over 3 million articles.
Looking for more in-depth information on this industry? Click here to search our complete database of Industry & Market reports by text, subject, publication name or publication date.
About Goliath Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.
Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information. |