Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 28-11-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
  xml > csv into mysql with a sprinkle of php

nice descriptive subject there

okay, I am now fine with putting CSV data into mysql database and doing stuff with it from there. easy.

but then I come across crazy merchants with xml feeds! really what are they playing at, anyway its just your normal xml like:

<?xml version="1.0"?>
<Products>
blah blah
</Products>

with lots of stuff in the middle that I want.

I was hoping excel would open it up how I wanted, but it hasn't so im a bit stumped as to where to go next.

Idealy Id like some script to parse that into proper CSV then I could run thatthrouhg the other script wich puts it into database. But if thats going to be a bit tricky just something that could get it as CSV on my computer and id upload from there.

Just looking for pointers really, what should I be searching for?

as always, help much appreciated
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-11-04
Registered User
 
Join Date: Aug 2003
Location: Worthing
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
QuaiD is an unknown quantity at this point
Dan,

The latest version of Excel (not sure if its XP or 2003) loads them fine.

Im using 2002 at the mo (must have loaded an old version when I last rebuilt) but that works with some using the "Data - Import External Data - Import Data" feature

Cheers
Jez
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 28-11-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
damn, im stuck with 2000

will go see what I can find, any other ideas welcome though
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 28-11-04
Registered User
 
Join Date: Aug 2003
Location: Cornwall
Posts: 209
Thanks: 0
Thanked 0 Times in 0 Posts
Melter is an unknown quantity at this point
Found this xml converter if it's any use to you, priced at about £22.

http://www.rustemsoft.com/home.htm#
__________________
Lcd Tv Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 08-12-04
Registered User
 
Join Date: Dec 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
apathy- is an unknown quantity at this point
http://www.hansanderson.com/php/xml
a free php class to parse xml into arrays

PHP Code:
include 'xmlize.inc';
//grab xml file into a string and parse it with the array
$file file('xml_file.xml');
$xml_in_array_format xmlize(implode(''$file));
//traverse it's nasty naming format and grab the item you want into a readable variable
$something $xml_in_array_format['something'][0]['#'];
//do some random sql query with our spanky new xml data in a variable
$result mysql_query("INSERT INTO table(field) VALUES '{$something}'"); 
the naming format it uses to fit everything into an array is a bit grim, but our friend here is print_r():
PHP Code:
echo '<pre>'print_r($xml_array), '</pre>'
i just made up the code abovce, but it should all check out ok in use.

good luck
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7