Diff for /loncom/xml/lonxml.pm between versions 1.179 and 1.180

version 1.179, 2002/07/01 15:29:23 version 1.180, 2002/07/12 16:37:38
Line 933  sub decreasedepth { Line 933  sub decreasedepth {
 #print "<br />e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";  #print "<br />e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";
 }  }
   
 sub get_all_text {  sub get_all_text_unbalanced {
    my($tag,$pars)= @_;
    my $token;
    my $result='';
    $tag='<'.$tag.'>';
    while ($token = $$pars[-1]->get_token) {
      if (($token->[0] eq 'T')||($token->[0] eq 'C')||($token->[0] eq 'D')) {
        $result.=$token->[1];
      } elsif ($token->[0] eq 'PI') {
        $result.=$token->[2];
      } elsif ($token->[0] eq 'S') {
        $result.=$token->[4];
      } elsif ($token->[0] eq 'E')  {
        $result.=$token->[2];
      }
      if ($result =~ /(.*)$tag(.*)/) {
        &Apache::lonxml::debug('Got a winner with leftovers ::'.$2);
        &Apache::lonxml::debug('Result is :'.$1);
        $result=$1;
        my $redo=$tag.$2;
        &Apache::lonxml::newparser($pars,\$redo);
        last;
      }
    }
    return $result
   }
   
   sub get_all_text {
  my($tag,$pars)= @_;   my($tag,$pars)= @_;
  my $depth=0;   my $depth=0;
  my $token;   my $token;
Line 1225  ENDNOTFOUND Line 1251  ENDNOTFOUND
 sub debug {  sub debug {
   if ($Apache::lonxml::debug eq 1) {    if ($Apache::lonxml::debug eq 1) {
     $|=1;      $|=1;
     print("DEBUG:".join('<br />',@_)."<br />\n");      print("DEBUG:".&HTML::Entities::encode($_[0])."<br />\n");
   }    }
 }  }
   

Removed from v.1.179  
changed lines
  Added in v.1.180


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>