NAME
eSTAR::RTML - Object Orientatied interface to create and parse RTML messages
SYNOPSIS
$rtml = new eSTAR::RTML();
DESCRIPTION
The module creates and parses RTML v2.1, the eSTAR version of the V2.x language specification. It provides a simple interface to automatically generate RTML messages used by the eSTAR project, but should be tweakable for more generic use fairly easily.
REVISION
$Id: RTML.pm,v 1.5 2003/07/15 20:58:11 aa Exp $
METHODS
Constructor
- new
-
Create a new instance from a hash of options
$rtml_object = new eSTAR::RTML( File => $rtml_file ); $rtml_object = new eSTAR::RTML( Source => $rtml_document );returns a reference to an RTML object.
Accessor Methods
- determine_type
-
Return the type of the RTML document
$type = $rtml->determine_type();this is the only information about the document available via this module, to fully parse the RTML the
eSTAR::RTMLobjet should be passed to an eSTAR::RTML::Parse object. - return_tree
-
Returnd the RTML document tree
$type = $rtml->return_tree();used by the
eSTAR::RTML::Parsemodule to pull theXML::Parsedocument tree from theeSTAR::RTMLobject. While a public method, its hard to see why you would want to do this unles the output is going to be parsed by a module that understands such trees. In which case it might be better to callXML::Parsedirectly rather than deal with theeSTAR::RTMLinfrastructure.
General Methods
- configure
-
Configures the object, takes an options hash as an argument
$rtml->configure( %options );does nothing if the hash is not supplied.
- file
-
Populates the object from a file returning the version number of the DTD.
$dtd = $rtml->file( $rtml_file );This method is called directly from configure() is the
Filekey and value is passed into to teh object in the %options hash. - source
-
Populates the object from a scalar returning the version number of the DTD.
$dtd = $rtml->source( $rtml );This method is called directly from configure() is the
Documentkey and value is passed into to teh object in the %options hash.
COPYRIGHT
Copyright (C) 2002 University of Exeter. All Rights Reserved.
This program was written as part of the eSTAR project and is free software; you can redistribute it and/or modify it under the terms of the GNU Public License.
AUTHORS
Alasdair Allan <aa@astro.ex.ac.uk>,