Created
February 19, 2015 11:16
-
-
Save ywatase/52991e1f0aa5fdccb0c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Path::Tiny; | |
use XML::LibXML::Simple qw(XMLin); | |
my $xml = path('sample.xml')->slurp_utf8; | |
my $dom = eval { XMLin $xml }; | |
if ($@) { | |
die "Parse Error"; | |
} | |
use Data::Dumper; warn Dumper $dom; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment