File: ex8.pl

package info (click to toggle)
libxml-dt-perl 0.3-1.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 296 kB
  • ctags: 42
  • sloc: perl: 914; xml: 424; makefile: 64
file content (15 lines) | stat: -rwxr-xr-x 277 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use XML::DT ;
my $filename = "ex8.xml";;

# tests number comparasion and string-length function


%handler=(
	  '-inputenc' => 'ISO-8859-1',
	  '//*[string-length(name())<2]' => sub{
	    print "$c\n";toxml
	  },
	 );
pathdt($filename,%handler);
print "\n";