By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,775 Members | 1,740 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,775 IT Pros & Developers. It's quick & easy.

How to write to an XML File

P: 3
I've to write the contents of an URL to an XML file. The URL is :


This page has statistics like "Batting and fielding averages", "Bowling averages". I've to write these to an XML file using Perl. I'm a C++ Programmer. I've no idea about this. Can any one tell me how to do this?
Jun 25 '10 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 2.5K+
P: 3,503
Unfortunately I have not done tons with XML, but looking at the site you have, you are going to have to find away to parse out the values that you are looking for. For that you could start by looking at the HTML::Parser module. Then you could use XML::Simple to manage the XML file.-

Hope that is a nudge in the right direction.


Jun 25 '10 #2

Expert 100+
P: 983

If you look on CPAN, there are a good number of XML processing modules. They vary in complexity and capability, depending on what you're trying to accomplish.

I searched for XML and got quite a list of available modules. I'd recommend looking at the XML::Trivial module and see if that suits your needs.

If not, then hunt around. Read the documentation. Most of the modules give small programming examples, which is how I do my first cut evaluation of things in CPAN.

Good luck.
Jul 1 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.