Aranea::XML::Aranea

CONTENTS


NAME

Aranea::XML::Aranea - object representing the Aranea XML object


SYNOPSIS


  use Aranea::XML::Aranea;
 
  my $stdin = new_from_fd IO::Handle(STDIN, "r");
  my $Aranea = Aranea::XML::Aranea->new($stdin);
 
  my $request_list = $Aranea->request_list();
  my $page_list = $Aranea->page_list();
  my $candidate_list = $Aranea->candidate_list();
 
  $Aranea->write_xml();   # prints the XML (optional arg = filename)


DESCRIPTION

Given an XML input stream, this object parses the input stream into a data structure, and knows how to write the data structure out.


METHODS

new([$filename])
Creates a new Aranea XML object from $filename. To read XML from stdin:


  my $stdin = new_from_fd IO::Handle(STDIN, "r");
  my $Aranea = Aranea::XML::Aranea->new($stdin);

request_list([$request_list])
Accesses or mutates the RequestList object, which corresponds the <request_list>) or the Aranea XML object.

page_list([$page_list])
Accesses or mutates the PageList object, which corresponds the <page_list>) or the Aranea XML object.

candidate_list([$candidate_list])
Accesses or mutates the CandidateList object, which corresponds the <candidate_list>) or the Aranea XML object.

insert_pipeline_tag($id)
Appends a timestamped identifier to the pipeline section of the Aranea XML object. The identifier is usually the CVS ID keyword from the calling program.

write_xml([$filename])
Prints out the XML of the Aranea XML object to STDOUT. If passed an optional arugment, the XML will be written to a file.


HINTS

How do I get access to the question?
Something like this will do:


  my $q = $Aranea->query()->text();
  my $qid = $Aranea->query()->id();