Convert SQL server data to XML using PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Extremist
    New Member
    • Jan 2007
    • 94

    #1

    Convert SQL server data to XML using PHP

    Hi there,
    I need to do webdevelopment with XML, is there any way I can get data from a SQL server and 'convert' it to XML and say, save it in a file as file.xml?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    There are some (free) php classes that you can use to accomplish that. Look at the following at www.phpclasses.org:

    MySQL to XML
    MySQL to XML - XML to MySQL

    Good luck!

    Ronald :cool:

    Comment

    • Extremist
      New Member
      • Jan 2007
      • 94

      #3
      Thanx for your help

      How much does SQL and PostGreSQL differ in trying to convert database data to XML using PHP?

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by Extremist
        Thanx for your help

        How much does SQL and PostGreSQL differ in trying to convert database data to XML using PHP?
        I don't really understand what you mean? Do you mean the SQL itself or the way to conect and exchange data with the PostGreSQL db?

        Anyway, to assist you could probably look at another class http://phpclasses.half2.nl/browse/package/1378.html
        that
        ........ manages connections to a PostgreSQL database server. It comes also with a class to perform SQL queries and retrieve the results.

        The connection class can execute queries and manage transactions. It can also create, read, write and delete large objects (LOBs).
        So, when necessary, you could adapt the MySQL-XML class to use PostGreSQL instead of MySQL.

        Ronald :cool:

        Comment

        • Extremist
          New Member
          • Jan 2007
          • 94

          #5
          Originally posted by ronverdonk
          I don't really understand what you mean? Do you mean the SQL itself or the way to conect and exchange data with the PostGreSQL db?

          Anyway, to assist you could probably look at another class http://phpclasses.half2.nl/browse/package/1378.html
          that

          So, when necessary, you could adapt the MySQL-XML class to use PostGreSQL instead of MySQL.

          Ronald :cool:
          Sorry, I didin't set myself quite clear.
          Yes, the way PostGreSQL exchanges/supplies data into php.
          I need to get data/records from PostGreSQL, convert it to XML and then use it in an OpenLaszlo app.
          Thank you soooooo much! You are really helping me, especially with the links.

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            Can I assume that you can get on with what you have or do you need more information?

            Ronald :cool:

            Comment

            • Extremist
              New Member
              • Jan 2007
              • 94

              #7
              Originally posted by ronverdonk
              Can I assume that you can get on with what you have or do you need more information?

              Ronald :cool:
              Thanx, I'm fine

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                Okay, see you around.

                Ronald :cool:

                Comment

                Working...