1GraphViz::XML(3)      User Contributed Perl Documentation     GraphViz::XML(3)
2
3
4

NAME

6       GraphViz::XML - Visualise XML as a tree
7

SYNOPSIS

9         use GraphViz::XML;
10
11         my $graph = GraphViz::XML->new($xml);
12         print $g->as_png;
13

DESCRIPTION

15       This module makes it easy to visualise XML as a tree. XML is hard for
16       humans to grasp, especially if the XML is computer-generated. This mod‐
17       ules aims to visualise the XML as a graph in order to make the struc‐
18       ture of the XML clear and to aid in understanding the XML.
19
20       XML elements are represented as diamond nodes, with links to elements
21       within them. Character data is represented in round nodes.
22
23       Note that the XML::Twig module should be installed.
24

METHODS

26       new
27
28       This is the constructor. It takes one mandatory argument, which is the
29       XML to be visualised. A GraphViz object is returned.
30
31         my $graph = GraphViz::XML->new($xml);
32
33       as_*
34
35       The XML can be visualised in a number of different graphical formats.
36       Methods include as_ps, as_hpgl, as_pcl, as_mif, as_pic, as_gd, as_gd2,
37       as_gif, as_jpeg, as_png, as_wbmp, as_ismap, as_imap, as_vrml, as_vtx,
38       as_mp, as_fig, as_svg. See the GraphViz documentation for more informa‐
39       tion. The two most common methods are:
40
41         # Print out a PNG-format file
42         print $g->as_png;
43
44         # Print out a PostScript-format file
45         print $g->as_ps;
46

BUGS

48       GraphViz tends to reorder the nodes. I hope to find a work around soon
49       (possibly with ports).
50

AUTHOR

52       Leon Brocard <acme@astray.com>
53
55       Copyright (C) 2001, Leon Brocard
56
57       This module is free software; you can redistribute it or modify it
58       under the same terms as Perl itself.
59
60
61
62perl v5.8.8                       2004-12-02                  GraphViz::XML(3)
Impressum