473,410 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

How to write to an XML File

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

[url="http://www.cricinfo.com/australia/content/player/8608.html"]

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
2 1620
numberwhun
3,509 Expert Mod 2GB
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.

Regards,

Jeff
Jun 25 '10 #2
Oralloy
988 Expert 512MB
rtr,

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

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

Similar topics

0
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the...
2
by: CJ | last post by:
I've got following: > file_a content needs to be compared with file_b content. I want to write content in binary form, then run a line by line comparison on characters. When the first different...
0
by: sunphan | last post by:
Hello all I wanted to create a data file from a stored procedure in DB2. I have to select few millions records, do certain checking or calculation on fields, store/append it in file and this will...
1
by: brabster | last post by:
Hi, this is my first post so please excuse any mistakes! I'd like to write files using an upload script in my website, but I'm having problems. I don't seem to be able to write a file. Ive set up...
1
by: pablo.erba | last post by:
Hi Everyone, I´m new to this group, I´m trying to write a text files adding content from a text column (more than 8000 characters), I found code how to write files and it works but i have the...
6
by: William Manley | last post by:
According to what I read in the ConfigParser module, this should work, but it doesn't. Can anyone point out what I'm doing wrong? def writeinifile ( self, FILE='P:/INI/test.ini',...
1
by: Debabrata Jana | last post by:
Hi all, I use solaris 5.8 OS. I have three OS user : 1) orac9ias 2)oracle9i 3)backup I use the following command to export a oracle export backup (I use oracle9i release 1):
4
by: FingerDemon | last post by:
I'm guessing I'm missing something obvious here, but I have searched around and re-read my Python books and references on simple file writing and I can't see the answer. I am running this in Windows...
1
by: Mr fahad | last post by:
#include <stdio.h> #include <conio.h> void main (void) { char ch; FILE *fp; fp=fopen ("fahd.txt","w"); while (ch=fgetc( )!='\r') fputc (ch,fp); fclose (fp);
4
by: Jim | last post by:
Hi There, I'm trying to read a file character by character. When I write the file out, there is one extra character which shows on the screen as a solid circle with a small question mark in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.