PDA

View Full Version : Converting XML or CSV to HTML and TXT -- How?


Delphi123
February 5th, 2005, 07:30 PM
Dear friends:

I am trying to export a MYSQL database (used with PHPMyChat). My format options are XML and CSV. I can save them and download them to my computer. But how do I convert them to HTML and/or TXT, that is, just the text of the chat discussions without any of the HTML or XML tags. I want to be able to copy and paste these exported transcriptions of our chat conversations into our forum. Any suggestions would be much appreciated.

Secondly, I can save messages from within PHPMyChat by typing /save

but what I can't figure out is where these messages are saved to. I know they are saved within PHPMYChat, but are they saved as a file? No such option is shown.


Thank you so much.

Benjamin

degsy
February 5th, 2005, 09:51 PM
You have several options.

Firstly I would recommend a tool such as phpMyAdmin to administer your database.

From here you have many export options with the database.
If you want to use CSV then a Spreadsheet program will be able to open the file and arrange it into rows & columns.

or you could setup a PHP script to run through the database tables to output the messages.


If you are using mySQL then the messages are save into a database table.

Delphi123
February 5th, 2005, 10:02 PM
Dear degsy:

Thanks again for responding.

I forgot to mention that my PHPMyChat is installed by default by my web host and includes a MYSQL database. When I spoke of converting the XML and CSV files, I was talking about the files saved in PHPMyAdmin, which comes with the MYSQL program (all part of the Cpanel programs). That's my problem: learning how to use PHPMyAdmin, specifically, how to export the c_message table properly and then clean up the tags so I can copy and paste them into a word processor.

Thanks again.

Benjamin

degsy
February 5th, 2005, 10:13 PM
export the table/field as CSV then import into a spreadsheet. From there you can copy the cells into a word processor.

The word Processer maybe able to do it for you, but I've only used CSV with Excel.