I was quessing that it would've been a hash. Well not enough experience with perls objects :).

But there were the functions somewhere. Thanks. Well this gets more complicated. My text function is now like this.
sub text (@) { # shift @_; if ($text && $_[1]=~/\S/) { # $UNIQ{$com}{$_[1]}++; # $i++; if ($str) { print XML::Parser::Expat::current_line($_[0]),",",XML::Parser::E +xpat::current_column($_[0]),"\n"; print "'$str','$_[1]'\n$com\n";exit; } $str .= $_[1]; } }
And the result of the run is this.
$ zcat data/uniprot_sprot.xml.gz | ./get_sp_fields.pl
26745,17
'Involve','d in the presentation of foreign antigens to the immune system'
function
And the rows from xml lines 26744-26746 are.
  <comment type="function">
    <text>Involved in the presentation of foreign antigens to the immune system</text>
  </comment>
So is there a bug in XML::Parser? Since the text section is split into two calls of subfunction text. Or am I missing something here...

In reply to Re^2: XML::Parser problems by Hena
in thread XML::Parser problems by Hena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.