ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/ihost-perl/ihost.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/ihost.pl (file contents):
Revision 1.44 by tdb, Tue Dec 18 04:07:17 2001 UTC vs.
Revision 1.46 by tdb, Mon Mar 11 13:34:24 2002 UTC

# Line 429 | Line 429 | sub make_xml() {
429                  $xmltemp .= &make_xml("$curlevel$curtag", $curline);
430              }
431              my($nextline) = $data[0]; chomp $nextline if defined $nextline;
432 <            if((defined $nextline) && ($nextline =~ /^$curlevel$curtag/)) {
432 >            $curtag =~ s/(.*)\./$1/;
433 >            if((defined $nextline) && ($nextline =~ /^$curlevel$curtag\./)) {
434                  $curline = "";
435              }
436              else {
436                $curtag =~ s/(.*)\./$1/;
437                  $xmltemp = "<$curtag$attributes>$xmltemp</$curtag>" unless $curtag eq "";
438                  return $xmltemp;
439              }
# Line 451 | Line 451 | sub make_xml() {
451                  return $xmltemp;
452              }
453          }
454 +        # dealing with a null value
455 +        elsif($curline =~ /^$curlevel([^\.\s]+)$/) {
456 +            # simply adding a space makes the above elsif deal with it :)
457 +            # just level with an empty tag in the XML
458 +            $curline .= " ";
459 +        }
460 +        # failing all that, skip the line
461 +        else {
462 +            $curline = "";
463 +        }
464      }
465   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines