InSilicoSpectro::Utils::XML::SaxIndexMaker - InSilicoSpectro::Utils::XML::SaxIndexMaker documentation


InSilicoSpectro documentation  | view source Contained in the InSilicoSpectro distribution.

Index


NAME

Top

InSilicoSpectro::Utils::XML::SaxIndexMaker

DESCRIPTION

Top

A handler to be used with XML::Parser::PerlSax. The goal is to read an indexMaker (xmlIndexMaker) file, stating which elements sould be indexed from a (large) source xml file. Then this source file is parsed, indexed element are saved into an index (xmlIndex) file.

METHODS

Top

my $sim=InSilicoSpectro::Utils::XML::SaxIndexMaker->new();

Instanciate a new SaxIndexMaker

$sim->readXmlIndexMaker($file)

$sim->readXmlIndexMaker(file=>$file)

$sim->readXmlIndexMaker(contents=>$xmlcontents)

Read what is to be caught and put into the index. xmlIndexMaker files follows the format

$sim->makeIndex($sourceFile, [$indexFile, [\%args]])

Opens $sourceFile and writes the index into $indexFile. $sourceFile is a normal valid xml.

$indexFile will look like the following example

%args can contain

origSrc=file

So that the origSrc is saved instead of the given $sourceFile (think that the $sourceFile may bonly be a temporary gunziped file)

printIndex([$out])

Print the index in a text format

FUNCTIONS

Top

COPYRIGHT

Top

AUTHORS

Top

Alexandre Masselot, www.genebio.com

Nicolas Budin, www.genebio.com


InSilicoSpectro documentation  | view source Contained in the InSilicoSpectro distribution.