Login   Register  
PHP Classes
elePHPant
Icontem

convert from XML to MYSQL/CSV

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      MySQL to XML - XML to MySQL  >  All threads  >  convert from XML to MYSQL/CSV  >  (Un) Subscribe thread alerts  
Subject:convert from XML to MYSQL/CSV
Summary:Hi , I want to convert a XML file to MYSQL/CSV
Messages:1
Author:Excellent
Date:2009-07-25 12:59:09
 

  1. convert from XML to MYSQL/CSV   Reply   Report abuse  
Picture of Excellent
Excellent
2009-07-25 12:59:09
Hi

I want to convert XML file to mysql but if not possible to convert in mysql then plz help to convert in CSV format, sample file is given below

test.xml

<?xml version="1.0" encoding="utf-8" ?>
<MembershipList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<L1CompanyCode>ABC</L1CompanyCode>
<Membership>
<MembershipNo>123456789</MembershipNo>
<ActivationDate>2006-06-01</ActivationDate>
<MembershipOrderID>167676</MembershipOrderID>
<SalesAgentID>4462</SalesAgentID>
<PackageSKU>ABC-1000</PackageSKU>
<RenewalFrequency>MO</RenewalFrequency>
<UserRef1>036057208</UserRef1>
<UserRef2 />
<Consumer>
<Salutation>MR.</Salutation>
<FirstName>JACQUES</FirstName>
<LastName>SADLER</LastName>
<Address1>2140 LEANDRA LANE</Address1>
<Address2 />
<City>FORT WORTH</City>
<State>TX</State>
<ZipCode>76131</ZipCode>
<PhoneAreaCode>817</PhoneAreaCode>
<Phone>8476645</Phone>
<Email />
<BirthDate>1971-03-18</BirthDate>
<Gender>M</Gender>
</Consumer>
</Membership>
<Membership>
<MembershipNo>111111111</MembershipNo>
<ActivationDate>2006-06-01</ActivationDate>
<MembershipOrderID>167676</MembershipOrderID>
<SalesAgentID>4462</SalesAgentID>
<PackageSKU>ABC-1000</PackageSKU>
<RenewalFrequency>MO</RenewalFrequency>
<UserRef1>036057208</UserRef1>
<UserRef2 />
<Consumer>
<Salutation>MR.</Salutation>
<FirstName>DEEPAK</FirstName>
<LastName>BAGHEL</LastName>
<Address1>2140 LEANDRA LANE</Address1>
<Address2 />
<City>RICHMOND HILL</City>
<State>ON</State>
<ZipCode>76131</ZipCode>
<PhoneAreaCode>817</PhoneAreaCode>
<Phone>8476645</Phone>
<Email />
<BirthDate>1971-03-18</BirthDate>
<Gender>M</Gender>
</Consumer>
</Membership>
</MembershipList>


Thanks in advance