Configuration: perl: 5.022000 OS: MSWin32 - MSWin32 required XML::Parser : 2.44 Der Befehl "xmlwf" ist entweder falsch geschrieben oder konnte nicht gefunden werden. expat : Strongly Recommended Scalar::Util : 1.42 (for improved memory management) Encode : 2.73 (for encoding conversions) Modules providing additional features XML::XPathEngine : (to use XML::Twig::XPath) XML::XPath : (to use XML::Twig::XPath if Tree::XPathEngine not available) LWP : 6.13 (for the parseurl method) HTML::TreeBuilder : 5.03 (to use parse_html and parsefile_html) HTML::Entities::Numbered : (to allow parsing of HTML containing named entities) HTML::Tidy : (to use parse_html and parsefile_html with the use_tidy option) HTML::Entities : 3.69 (for the html_encode filter) Tie::IxHash : (for the keep_atts_order option) Text::Wrap : 2013.0523 (to use the "wrapped" option for pretty_print) Modules used only by the auto tests Test : 1.26 Test::Pod : 1.50 XML::Simple : 2.20 XML::Handler::YAWriter : XML::SAX::Writer : XML::Filter::BufferText : IO::Scalar : 2.111 IO::CaptureOutput : 1.1104 Please add this information to bug reports (you can run t\zz_dump_config.t to get it) if you are upgrading the module from a previous version, make sure you read the Changes file for bug fixes, new features and the occasional COMPATIBILITY WARNING 1..1 ok 1 #### "> %dtd; ]> &all; #### #### it_works #### #!/usr/bin/perl use strict; use XML::Twig; my $t= XML::Twig->new(); $t->parsefile('../../xml_files_windows/parameterEntity_core.xml', ParseParamEnt => 1); my $root = $t->root; my $content = $root->first_child->text; print $content; #### cannot expand %dtd; - cannot load 'http://127.0.0.1:5000/parameterEntity_core.dtd' at C:/Strawberry/perl/vendor/lib/XML/Parser/Expat.pm line 474. #### sub _twig_extern_ent { # warn " in _twig_extern_ent...I (", $_[0]->original_string, ")\n"; # DEBUG handler my( $p, $base, $sysid, $pubid)= @_; my $t= $p->{twig}; if( $t->{twig_no_expand}) { my $ent_name= $t->{twig_keep_encoding} ? $p->original_string : $p->recognized_string; _twig_insert_ent( $t, $ent_name); return ''; } my $ent_content= eval { $t->{twig_ext_ent_handler}->( $p, $base, $sysid) }; if( ! defined $ent_content) { my $ent_name = $p->recognized_string; my $file = _based_filename( $sysid, $base); my $error_message= "cannot expand $ent_name - cannot load '$file'"; if( $t->{twig_extern_ent_nofail}) { return ""; } else { _croak( $error_message); } } return $ent_content; } #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP')) { $self->{twig_ext_ent_handler}= \&XML::Parser::initial_ext_ent_handler } elsif( $args{NoXxe}) { $self->{twig_ext_ent_handler}= sub { my($xp, $base, $path) = @_; $xp->{ErrorMessage}.= "cannot use entities in document when the no_xxe option is on"; return undef; }; } else { $self->{twig_ext_ent_handler}= \&XML::Parser::file_ext_ent_handler } #### $t->parsefile('../../xml_files_windows/parameterEntity_core.xml'); #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP')) #### if( !$args{NoLWP} ) #### $t->parsefile('../../xml_files_windows/parameterEntity_core.xml', ParseParamEnt => 1); #### if( !$args{NoLWP} ) #### $t->parsefile('../../xml_files_windows/parameterEntity_core.xml', ParseParamEnt => 1); #### if( !$args{NoLWP} && ! _use( 'URI') ) #### if( !$args{NoLWP} && ! _use( 'URI::File') ) #### if( !$args{NoLWP} && ! _use( 'LWP')) #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP')) #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP')) { $self->{twig_ext_ent_handler}= \&XML::Parser::file_ext_ent_handler } #### $t->parsefile('../../xml_files_windows/parameterEntity_core.xml', ParseParamEnt => 1); #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP')) { $self->{twig_ext_ent_handler}= \&XML::Parser::file_ext_ent_handler } elsif( $args{NoXxe}) { $self->{twig_ext_ent_handler}= sub { my($xp, $base, $path) = @_; $xp->{ErrorMessage}.= "cannot use entities in document when the no_xxe option is on"; return undef; }; } else { $self->{twig_ext_ent_handler}= \&XML::Parser::initial_ext_ent_handler } #### $t->parsefile('../../xml_files_windows/parameterEntity_core.xml', ParseParamEnt => 1); #### if( !$args{NoLWP} && ! _use( 'URI') && ! _use( 'URI::File') && ! _use( 'LWP'))