GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BIO::ONTOLOGYIO::HANDLERS::BASESAXHANDLER (3)

.ds Aq ’

NAME

Bio::OntologyIO::Handlers::BaseSAXHandler base class for SAX Handlers

CONTENTS

SYNOPSIS

See description.

DESCRIPTION

This module is an abstract module, serving as the base of any SAX Handler implementation. It tries to offer the framework that SAX handlers generally need, such as tag_stack, char_store, etc.

In the implementation handler, you can take advantage of this based module by the following suggestions.

1) In start_element,



 sub start_element {
     my $self=shift;
     my $tag=$_[0]->{Name};
     my %args=%{$_[0]->{Attributes}};
     # Your code here.

     # Before you conclude the method, write these 2 line.
     $self->_visited_count_inc($tag);
     $self->_push_tag($tag);
 }



2) In end_element,



 sub end_element {
     my $self=shift;
     my $tag=shift->{Name};
     # Your code here.

     # Before you conclude the method, write these 2 lines.
     $self->_visited_count_dec($tag);
     $self->_pop_tag;
 }



3) In characters, or any other methods where you may use the tag stack or count



 sub characters {
     my $self=shift;
     my $text=shift->{Data};

     $self->_chars_hash->{$self->_top_tag} .= $text;

 }
 $count = $self->_visited_count(myTag);
 $tag = $self->_top_tag;



FEEDBACK

    Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists.

Your participation is much appreciated.



  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists



    Support

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

    Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:



  https://github.com/bioperl/bioperl-live/issues



AUTHOR

Juguang Xiao, juguang@tll.org.sg

    APPENDIX

The rest of the documentation details each of the object methods. Interal methods are usually preceded with a _

    _tag_stack



  Title   : _tag_stack
  Usage   : @tags = $self->_tag_stack;
  Function: Get an array of tags that have been accessed but not enclosed.
  Return  :
  Args    :



    _push_tag

    _pop_tag

    _top_tag



  Title   : _top_tag
  Usage   : $top = $self->_top_tag;
  Function: get the top tag in the tag stack.
  Return  : a tag name
  Args    : [none]



    _chars_hash



  Title   : _chars_hash
  Usage   : $hash= $self->_chars_hash;
  Function: return the character cache for the specific tag
  Return  : a hash reference, which is intent for character storage for tags
  Args    : [none]



    _current_hash

    _visited_count_inc



  Title   : _vistied_count_inc
  Usage   : $self->vistied_count_inc($tag); # the counter for the tag increase
  Function: the counter for the tag increase
  Return  : the current count after this increment
  Args    : the tag name [scalar]



    _visited_count_dec



  Title   : _visited_count_dec
  Usage   : $self->_visited_count_dec($tag);
  Function: the counter for the tag decreases by one
  Return  : the current count for the specific tag after the decrement
  Args    : the tag name [scalar]



    _visited_count



  Title   : _visited_count
  Usage   : $count = $self->_visited_count
  Function: return the counter for the tag
  Return  : the current counter for the specific tag
  Args    : the tag name [scalar]



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 BIO::ONTOLOGYIO::HANDLERS::BASESAXHANDLER (3) 2016-04-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.