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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl and xml

Status
Not open for further replies.

myasin78

Programmer
Jan 26, 2004
50
US
hello all,
I am looking to read mysql database and then convert the recoreds int xml format.

I can read mysql easily, so right now i am testing flat file "tab delimated file" to import the data into xml format. I am using XML::Simple;

here is my code.

my $fi = "file.txt";
my $xml = XMLout($fi);

there is no error or result. can someone help me please.
thanks,
 
I've not used XML::Simple but maybe you haven't got a problem. Have you tried printing $xml to see if the variable contains the result?


Kind Regards
Duncan
 
I solved the problem by reading the text file into hash

%hash[$i]{name} = $str;
my $xml = XMLout(%hash);

thanks,

Monther.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top