File: ex5.pl

package info (click to toggle)
libxml-dt-perl 0.69-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 388 kB
  • sloc: perl: 1,432; xml: 438; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use XML::DT ;
my $filename = 'ex5.xml';

# tests if exist @* atribute or not(@*)

%handler=(
#    '-outputenc' => 'ISO-8859-1',
#    '-default'   => sub{ ""},
#     'ccc' => sub{"$q:$c"},
     '//*[not(@*)]' => sub{print "$c\n";toxml},
#     'ddd' => sub{"$q:$c"},
#     'bbb' => sub{"$q:$c"},
#     'eee' => sub{"$q:$c"},
);
pathdt($filename,%handler);
print "\n";