Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read in XML, Write out XML

Status
Not open for further replies.

oliverreade

Programmer
Mar 12, 2002
10
0
0
GB
I can read in an XML file, but I don't know how to create an XML file from what has been read in!

How do I create an XML file with the information I have read in from an XML file?


Thanx
Oliver Reade
 
go to and look for XML modules. There are plenty that can do the processing for you. I currently use XML::parser, but it isn't the easiest of modules to get to grips with. Apparantly XML::Simple is a good basic module to use.

HTH,
Barbie. Leader of Birmingham Perl Mongers
 
I must be close to looking at all the descriptions on the net re: XML::Simple.

I have used it and can get it to display XML files but I don't know how to use to to create XML files. There is no practical example!!!

The SYNOPSIS for XML::Simple is:-

my $xml = XMLout($hashref [, <options>]);

whereas XMLin's example is:-

my $ref = XMLin([<xml file or string>] [, <option>]);

Therefore I can getthe first part of my program to work (ie read in an XML file), but I can't get the second part of my program to work. Which is to write out a new XML file from the original XML file that was read in.


Thanx
Oliver Reade
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top