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 > Xml

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-07, 04:50
silas silas is offline
Registered User
 
Join Date: Mar 2007
Posts: 97
Xml

Hello,

can you please help me. I need to get a hierarchical xml output with just one table and 3 columns.

Table looks like this


Code:
continent       country   state
Europe           Germany    Bavaria
Europe           Germany    Saxony
Europe           Switzerland   Basel
NorthAmerica      USA     Texas
NorthAmerica      USA     Florida
XML should look like this, so I can easily import data in a treeview
Code:
Europe
    Germany
       Bavaria
       Saxony
    Switzerland
       Basel
Northamerica
   USA
      Texas
      Florida
I tried xml auto, raw and explicit. But still no success. You have any idea?
Reply With Quote
  #2 (permalink)  
Old 07-26-07, 08:24
anjanesh anjanesh is offline
Registered User
 
Join Date: Feb 2005
Location: Mumbai, India
Posts: 161
Are you sure this is possible using SQL alone ?
You can easily do this using some programming languages like php/python to display this XML.
__________________
MySQL 5.1
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