Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML loaed from a database?

    Hello, if i stored all my XML in a MySQL database, would there be a way to get it so that the user could download it so that it could be parsed on the client side? Thanks a lot.
    ~evlich

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You just retrieve it and echo it to the page. At the client end, all they would receive it XML, and no PHP/MySQL

    Jee
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,460
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Don't forget to set the content-type appropriately! PHP defaults to an output of text/html.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The new phpMyAdmin (2.3.0-rc2) lets you export your database as XML If you weren't using your database for dynamic pages (the database can't be changed online by anyone but the admin etc) then you could just make any db changes, export as XML, and upload.

    The XML export isn't anything fancy, though. It formats it like so:

    <db_name>
    &nbsp;&nbsp;<table_name>
    &nbsp;&nbsp;&nbsp;&nbsp;<field_name>Data</field_name>
    &nbsp;&nbsp;</table_name>
    </db_name>

    Which can easily be done using a pretty simple PHP script.
    Offtone.com - In the works...


  •  

    Posting Permissions

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