~ubuntu-branches/ubuntu/trusty/xmltoman/trusty

« back to all changes in this revision

Viewing changes to xmlmantohtml

  • Committer: Bazaar Package Importer
  • Author(s): Jose Carlos Medeiros
  • Date: 2008-06-15 23:53:14 UTC
  • mfrom: (2.1.1 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080615235314-jpj9nl6yx4c8pbo7
Tags: 0.4-2
* debian/control:
  - Standards-Version: 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
  my $expat = shift;
130
130
  my $string = shift;
131
131
 
 
132
  $string =~ s/&/&/gs;
 
133
  $string =~ s/</&lt;/gs;
 
134
  $string =~ s/>/&gt;/gs;
 
135
  $string =~ s/"/&quot;/gs;
 
136
 
132
137
  $buffer .= $string;
133
138
}
134
139
 
135
140
MAIN:{
136
141
  my $file = shift;
137
142
 
 
143
  if (!$file) {
 
144
    print STDERR "You need to specify a file to parse\n";
 
145
    exit(1);
 
146
  }
 
147
 
138
148
  my $parser = new XML::Parser(Handlers => {Start => \&handle_start,
139
149
                                            End   => \&handle_end,
140
150
                                            Char  => \&handle_char});