i need to import this xml data into mysql database.. i dont have clear idea about it.
this is my .xml file
<employee>
<row>
<field name="employee_name">Syed</field>
<field name="employee_code">101</field>
<field name="employee_email">syed@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">7412347798</field>
<field name="employee_salary">6000</field>
<field name="employee_age">21</field>
</row>
<row>
<field name="employee_name">Hari</field>
<field name="employee_code">102</field>
<field name="employee_email">hari@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">9895852525</field>
<field name="employee_salary">6000</field>
<field name="employee_age">23</field>
</row>
<row>
<field name="employee_name">Raja</field>
<field name="employee_code">103</field>
<field name="employee_email">raja@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">9956853458</field>
<field name="employee_salary">6000</field>
<field name="employee_age">23</field>
</row>
<row>
<field name="employee_name">imran</field>
<field name="employee_code">104</field>
<field name="employee_email">imran@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">9836052525</field>
<field name="employee_salary">6000</field>
<field name="employee_age">21</field>
</row>
<row>
<field name="employee_name">Sam</field>
<field name="employee_code">105</field>
<field name="employee_email">sam@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">8625852525</field>
<field name="employee_salary">6000</field>
<field name="employee_age">21</field>
</row>
<row>
<field name="employee_name">vinod</field>
<field name="employee_code">106</field>
<field name="employee_email">vinod@gmail.com</field>
<field name="employee_designation">Trainee</field>
<field name="employee_number">7225852525</field>
<field name="employee_salary">6000</field>
<field name="employee_age">24</field>
</row>
</employee>
my routine for this function is,
if ($file) {
$handle = simplexml_load_file($file); // Open the file and read
while($strBookData = fgets($handle, 4096)) { // To get Array
$strDatas[] = $strBookData;
$strTableColumn = count($strBookData); // To Get Column count
}
i dont know what to do further.. can any one give me suggestions?? thanks in advance :)