insert data from xml page into mysql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mariaz
    New Member
    • Mar 2008
    • 11

    #1

    insert data from xml page into mysql database

    Hello, I have an xml page, which is not saved in my computer but it is online, because it a feed of a website. I want to import the data from this xml page into a mysql database. Can anyone suggest some steps as to how I can do this?I need the database because I have to write queries about the data, that is why I am not using directly the xml.Thank you in advance!
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    You could query the xml directly, using xquery/xpath.

    Otherwise, we need to know the application that is getting the xml to the mysql database. ASP? PHP?
    It would probably involve creating a HTTPRequest object, pointing it to the page, and getting an xml response back as a string.
    Then load it using XML Load functions in MySQL

    Comment

    • mariaz
      New Member
      • Mar 2008
      • 11

      #3
      Originally posted by jkmyoung
      You could query the xml directly, using xquery/xpath.

      Otherwise, we need to know the application that is getting the xml to the mysql database. ASP? PHP?
      It would probably involve creating a HTTPRequest object, pointing it to the page, and getting an xml response back as a string.
      Then load it using XML Load functions in MySQL
      I would prefer using java, if that is possible, because I'm using NetBeans and with java it would be easier for me, but I don't know if that's possible. Is there a useful tutorial for this kind of operation?

      Comment

      Working...