⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaulted.t

📁 one of the linux gd libraries
💻 T
字号:
BEGIN {print "1..4\n";}END {print "not ok 1\n" unless $loaded;}use XML::Parser;$loaded = 1;print "ok 1\n";$doc =<<'End_of_Doc;';<!DOCTYPE foo [<!ATTLIST bar zz CDATA 'there'>]><foo>  <bar xx="hello"/>  <bar zz="other"/></foo>End_of_Doc;sub st {  my $xp = shift;  my $el = shift;    if ($el eq 'bar') {    my %atts = @_;    my %isdflt;    my $specified = $xp->specified_attr;    for (my $i = $specified; $i < @_; $i += 2) {      $isdflt{$_[$i]} = 1;    }    if (defined $atts{xx}) {      print 'not '	if $isdflt{'xx'};      print "ok 2\n";      print 'not '	unless $isdflt{'zz'};      print "ok 3\n";    }    else {      print 'not '	if $isdflt{'zz'};      print "ok 4\n";    }  }}$p = new XML::Parser(Handlers => {Start => \&st});$p->parse($doc);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -