Migrate XML to MySQL?

P

Pasi

Hi all! I have a problem with xml-data. My small enterprice is asked to
renew one car reseller company's (Comp.) websites. This company uses
national dataservice (NServ.) about used cars and their pricing, and
it wants to keep that service going on.

I contacted NServ system operator and he provided me with four links,
three to their xml -feed concerning Comp:s data, one to relating DTD
-file.

Is it possible to transfer XML-data to Mysql-tables??? We have a fully
functioning Php-Mysql -program with configurable tables. If I could
automatically include Nserv data to my tables, problems would be
solved.

Please advise. I am newcomer in XML, so basic information, focused on
the problem - good manuals, good but reasonable cheap softwares etc
are also more than welcome.
 
S

Skeets

i use postgresql, but this should be possible.

you need to extract the xml data that you want to go into the mysl db
and then import the data into the db.

i'm also just learning xml manipulation. php.xpath offer some
functionality. there ar emany others, depending on your needs and
programming experience.

my initial thought would be to extract the data, put it in an Oo_Org
spreadsheet and then export as a csv file that can be read into mysql.

a google search or two should help a lot.

best of luck.
 
D

Darkstar 3D

Yes this is possible. Just remember that parsing XML to input the data
is a bit slower than generating XML. And this is possible in more than
just PHP. Skeets, in a case like this, PHP would work, but I don't
think it is the best solution IMHO.
 
P

Peter Flynn

Pasi said:
Hi all! I have a problem with xml-data. My small enterprice is asked to
renew one car reseller company's (Comp.) websites. This company uses
national dataservice (NServ.) about used cars and their pricing, and
it wants to keep that service going on.

I contacted NServ system operator and he provided me with four links,
three to their xml -feed concerning Comp:s data, one to relating DTD
-file.

Is it possible to transfer XML-data to Mysql-tables??? We have a fully
functioning Php-Mysql -program with configurable tables. If I could
automatically include Nserv data to my tables, problems would be
solved.

Please advise. I am newcomer in XML, so basic information, focused on
the problem - good manuals, good but reasonable cheap softwares etc
are also more than welcome.

The XML FAQ is at http://xml.silmaril.ie/

///Peter
 
P

Pasi

Has anyone tried parsing example 3 at www. php.net/xml and then
str_replace() -function.

In my example at http://www.icrea.fi/temp/test3.php I am at half way
through - Hopefully The parser works fine with external http://...
-link. My goal is to create install or update -clauses for each key
/ value -pair by having registration number (here sos_security) as
unique key at MySQL-table . The program first tries to install data. If
data already exists, the program updates that information.

Does this make sense?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,255
Members
46,852
Latest member
CarlaDowle

Latest Threads

Top