www.webdeveloper.com
Results 1 to 4 of 4

Thread: Inserting MySQL data into existing xml file

  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Inserting MySQL data into existing xml file

    Hi,
    I have an xml file with a value I need to be read from a MySQL database. I'm not sure of the best way to include this value into the XML.

    The database table only has 1 entry, 2 fields, ID and target, it's target I want to include.

    The line in the XML file is:

    <Gauge2RadialNeedle id="needle2" value="270" stroke="#000000" strokeWidth="1"

    I need to replace the value - 270 - with the data from the database.

    Hope someone can help, it's driving me nuts and Great Uncle Google has been useless this time!

    Dan

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Quote Originally Posted by danbm View Post
    Great Uncle Google has been useless this time!
    That's because there are as many ways to accomplish this as there are tools. What tools do you have available? PHP? Perl? Are you on a Windows box?
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Mar 2009
    Posts
    2
    php on a linux box.

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Then you'll need to parse the XML into a tree, read the DB and modify the tree accordingly. The folks over on the PHP forum will be better able to help you.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles