If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > extract mysql data into xml format--URGENT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-04, 21:22
t_ple81 t_ple81 is offline
Registered User
 
Join Date: Mar 2004
Posts: 8
Unhappy extract mysql data into xml format--URGENT

all my database are inside mysql and i do not know on how to extract it and view it in the xml format. Im still beginner and really need someone to help and guide me on what to do. I would be appreciate if someone could help me on this and if possible, i really need to know the step by step on how to do it...
thanx...
Reply With Quote
  #2 (permalink)  
Old 03-02-04, 23:44
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Re: extract mysql data into xml format--URGENT

It just takes one step. What you need to do is use the mysqldump program. Execute the program with the option -X or --xml. Here's an example:
Code:
mysqldump -X test > test.xml
This dumps the test database into the test.xml file in XML format. You may need to provide a username and password, if your database requires it. If you need more information, check out the manual.
http://www.mysql.com/doc/en/mysqldump.html
Reply With Quote
  #3 (permalink)  
Old 03-03-04, 00:17
t_ple81 t_ple81 is offline
Registered User
 
Join Date: Mar 2004
Posts: 8
mysql -> xml -> JSP

that would dump all the database into the xml file.

what i need to do is some sort of reporting for user log information for my system. i need to query all the log information from mysql into xml format and then display it using JSP and this should be done automatically whenever the user request for it. How do I do this - the simplest way?
This is my first experience with xml and JSP and I just have no idea about it. Help.... anybody?
Reply With Quote
  #4 (permalink)  
Old 03-03-04, 02:24
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Re: mysql -> xml -> JSP

If you are going to do it directly from JSP, there is no MySQL-specific way of doing it. What you need to do is to look for a JSP tag library that will convert JDBC output to XML.
Reply With Quote
  #5 (permalink)  
Old 03-03-04, 03:13
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: mysql -> xml -> JSP

Quote:
Originally posted by t_ple81
that would dump all the database into the xml file.

what i need to do is some sort of reporting for user log information for my system. i need to query all the log information from mysql into xml format and then display it using JSP and this should be done automatically whenever the user request for it. How do I do this - the simplest way?
This is my first experience with xml and JSP and I just have no idea about it. Help.... anybody?
"that would dump all the database into the xml file" - That is not true because you can dump also specific table. Try mysqldump --help that tell you more.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On