Try this:
use strict; use warnings; use XML::LibXML; my $file = qq(appsimage_EBSB4.xml); open my $fh, '<', $file; binmode $fh; my $doc = XML::LibXML->load_xml(IO => $fh); close $fh; print $doc->toString(); __END__ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE clone [ <!ENTITY envPageConfig SYSTEM "./envPageConfig.xml"> ]> <clone-config> <comt4> <bolinfpwd>welcome</bolinfpwd> </comt4> </clone-config>
Edit: forgot my $doc :-(
Please note: your entity should be written as &envPageConfig;, not "&envPageConfig";.
Update:
This might be helpful too:
use strict; use warnings; use XML::Twig; use Data::Dumper; my $file = qq(appsimage_EBSB4.xml); my $hash_ref = XML::Twig->new()->parsefile( $file )->simplify(); print Dumper($hash_ref); print $hash_ref->{comt4}->{bolinfpwd};
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
In reply to Re: Duplicate entries with nested xml
by karlgoethebier
in thread Duplicate entries with nested xml
by Raghu.S
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |