File: 06_output.pl

package info (click to toggle)
libxml-dt-perl 0.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 296 kB
  • ctags: 42
  • sloc: perl: 914; xml: 424; makefile: 64
file content (23 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl
use XML::DT ;
my $filename = shift;

%handler=(
#    '-outputenc' => 'ISO-8859-1',
#    '-default'   => sub{"<$q>$c</$q>"},
     'a' => sub{
       # occurred 1 times
       "$q:$c"
     },
     'b' => sub{
       # remember attributes $v{title}
       # occurred 3 times
       "$q:$c"
     },
     'c' => sub{
       # remember attributes $v{title}
       # occurred 6 times
       "$q:$c"
     },
);
print dt($filename,%handler);