XTM::Path

XTM::Path is a Perl module with topic map management, XPath like retrieval and construction facility.
Download

XTM::Path Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Robert Barta
  • Publisher web site:
  • http://search.cpan.org/~drrho/TM-1.43/lib/TM/PSI.pm

XTM::Path Tags


XTM::Path Description

XTM::Path is a Perl module with topic map management, XPath like retrieval and construction facility. XTM::Path is a Perl module with topic map management, XPath like retrieval and construction facility.SYNOPSIS use XTM::XML; $tm = new XTM (tie => new XTM::XML (file => 'mymap.tm')); # binds variable to channel use XTM::Path; my $xtmp = new XTM::Path (default => $tm); # find particular topics and print topic id foreach my $t ($xtmp->find ('/topic')) { print $t->id; } # same using find twice foreach my $t ($xtmp->find ('/topic')) { print $xtmp->find ('@id', $t); } # create a topic $t = $xtmp->create ('topic'); # same but with baseName $t = $xtmp->create ('topic/baseNameString'); # associations are always cumbersome $a = $xtmp->create ('association ] ]');This class provides a simple way to drill down the XTM data structures by following an XPath like approach.The XTM standard (http://www.topicmaps.org/xtm/) is used as the basis to formulate XTM-Path queries. To find a particular topic, for instance, you might use /topicIt is important to note that this package will NOT work on the original XTM document (this might even not exist if the map is created via other means), but is instead using the XTM::base data structure. This implies that all querying is done after merging and consolidation has been done.Obviously, XTM::Path cannot be a complete query language, but it is useful in many development situations where drilling down the data structure is a cumbersome exercise. Together with intelligent add methods in XTM::Memory and XTM::generic this should simplify drastically the access, creation and manipulation of XTM data structures. Requirements: · Perl


XTM::Path Related Software