-
-
27 Mar 2021 17:31:55 UTC
- Distribution: Graph-ReadWrite
- Module version: 2.10
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (7)
- Testers (276 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (29.29KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Graph::Reader::XML - class for reading a Graph instance from XML
SYNOPSIS
use Graph::Reader::XML; use Graph; $reader = Graph::Reader::XML->new(); $graph = $reader->read_graph('mygraph.xml');
DESCRIPTION
Graph::Reader::XML is a perl class used to read a directed graph stored as XML, and return an instance of the Graph class.
The XML format is designed to support the Graph classes: it can be used to represent a single graph with a collection of nodes, and edges between those nodes. The graph, nodes, and edges can all have attributes specified,
Graph::Reader::XML is a subclass of Graph::Reader, which defines the generic interface for Graph reader classes.
METHODS
new()
Constructor - generate a new reader instance.
$reader = Graph::Reader::XML->new();
This doesn't take any arguments.
read_graph()
Read a graph from a file:
$graph = $reader->read_graph( $file );
The
$file
argument can be either a filename or a filehandle of a previously opened file.KNOWN BUGS
Attribute values must be scalar. If they're not, well, you're on your own.
SEE ALSO
- Graph::Reader
-
The base class for Graph::Reader::XML.
- Graph::Writer::XML
-
Used to serialise a Graph instance as XML.
- Graph
-
Jarkko Hietaniemi's classes for representing directed graphs.
REPOSITORY
https://github.com/neilb/Graph-ReadWrite
AUTHOR
Neil Bowers <neil@bowers.com>
COPYRIGHT
Copyright (c) 2001-2012, Neil Bowers. All rights reserved. Copyright (c) 2001, Canon Research Centre Europe. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Graph::ReadWrite, copy and paste the appropriate command in to your terminal.
cpanm Graph::ReadWrite
perl -MCPAN -e shell install Graph::ReadWrite
For more information on module installation, please visit the detailed CPAN module installation guide.