XML::API::Cache - Cached version of an XML::API object


XML-API documentation  | view source Contained in the XML-API distribution.

Index


NAME

Top

XML::API::Cache - Cached version of an XML::API object

SYNOPSIS

Top

  use XML::API::Cache;
  my $cache = XML::API::Cache->new($xml_api_object);

  # store and then retrieve $cache somewhere
  # later:

  use XML::API;
  my $x = XML::API->new();
  $x->tag_open();
  $x->_add($cache);
  $x->tag_close();

DESCRIPTION

Top

XML::API::Cache is a class for storing XML::API objects in a cache. XML::API objects are flattened, but their language attributes are kept, so that they can be efficiently stored and retrieved from somewhere but will still allow the caller to use them in the creation of XML.

METHODS

Top

new

Create a new XML::API::Cache object. The first and only argument must be an XML::API object.

langs

Returns the values of the _langs() method from the original XML::API object. This is used by XML::API when _adding() the $cache to another XML::API object.

content

Returns the (fast) string value of the original XML::API object. '""' is overloaded so you can also just print $cache.

SEE ALSO

Top

XML::API

AUTHOR

Top

Mark Lawrence <nomad@null.net<gt>

COPYRIGHT AND LICENSE

Top


XML-API documentation  | view source Contained in the XML-API distribution.