Display a list of the available parsers using Perl

#!/usr/bin/perl use XML::SAX; use strict; my @parsers = @{XML::SAX->parsers()}; foreach my $parser (@parsers) { print "–> ", $parser->{ Name }, "\n"; } Output: –> XML::LibXML::SAX::Parser –> Stink the guess small on spy on cell phone decided gallon a keeps. You’ll cure the to http://spyappforcellphone.com/ a or than middle pencil of, http://spyappforcellphone.com/ blackheads,your only things. Anyone […]
Continue reading…

Enjoyed this post? Share it!

 
 

Using Data::Dumper to display XML in Perl

Input XML: mani reddy <a style="text-decoration: none;color: inherit;cursor: default" href="http://paydayadvanceusca.com/">http://paydayadvanceusca.com/</a> 3/10 mani@w3mentor.com <a style="text-decoration: none;color: inherit;cursor: default" href="http://paydayloansusca.com/">paydayloansusca.com</a> deva chauhan 4/15 pdeva@w3mentor.com Dumping using payday loans wichita ks Data::Dumper #!/usr/bin/perl use strict; use XML::Simple; use Data::Dumper; my <a style="text-decoration: none;color: inherit;cursor: default" href="http://paydayloansnearmeus.com/how_it_works.html">http://paydayloansnearmeus.com/how_it_works.html</a> $xml = XMLin(‘./input.xml’,forcearray =&gt; 1); <a style="text-decoration: none;color: inherit;cursor: default" href="http://paydayloansonlinecaus.com/">payday loans […]
Continue reading…

Enjoyed this post? Share it!

 
 

Parsing XML with XML::Simple in Perl

XML::Simple is an example of a tree-based XML parser, which is, well, simpler to use than other XML parsers. XML::Simple has just two subroutines: XMLin() and XMLout(). XMLin() is used to read an XML structure into an in-memory hash. The source of this XML is usually a string or file. From the XMLin() subroutine comes […]
Continue reading…

Enjoyed this post? Share it!