NAME

VOTABLE::TD - VOTABLE TD XML element class


SYNOPSIS

use VOTABLE::TD;


DESCRIPTION

This class implements the TD element from the VOTABLE DTD. This element is used to store the contents of a single table cell, and is analogous to the TD element in HTML.

The TD element is a Tier 0 element, and is described by the following excerpt from the VOTABLE 1.0 DTD:

 <!ELEMENT TD (#PCDATA)>
 <!ATTLIST TD
         ref IDREF #IMPLIED
 >

Methods

new($str_or_ref, %options)

Create a new VOTABLE::TD object, and return a reference to it. If the first argument ($str_or_ref) is a string, it is used as the initial PCDATA content of the TD element. If the first argument is a reference to a XML::DOM::Element object, that object is used to initialize the new TD element (implicitly assuming that the XML::DOM::Element object contains a valid TD element). The %options hash is used to set the attributes of the new element. If the first argument is missing or undefined, or an empty string, create and return an empty VOTABLE::TD object. Return undef if an error occurs.

get

Return a string containing the PCDATA content of the TD element. Return undef if the element has no PCDATA content, or an error occurs.

set($str)

Set the PCDATA content of the TD element to the specified string. Return the string on success, or undef if an error occurs.

Notes on class internals


WARNINGS


SEE ALSO

VOTABLE, VOTABLE::TR


AUTHOR

Eric Winter, NASA GSFC (elwinter@milkyway.gsfc.nasa.gov)


VERSION

$Id: TD.pm,v 1.1.1.8 2002/05/21 14:13:49 elwinter Exp $