Results 1 to 2 of 2

Thread: Xml

  1. #1
    Join Date
    Mar 2007
    Posts
    97

    Unanswered: 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?

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •