Hi ,
I have been playing around with xml lately and I have a small project to do.
The xml file is stored on my computer and here is an example on how I am reading the xml file using simplexml.
Code:
//load the xml file
$xml = simplexml_load_file("test.xml");

//Get the name of the first element
echo $xml->getName() . "<br />";

// create a loop that will trigger on each child node using the children() function
foreach($xml->children() as $child)
  {
  // output the element data and name for each child node
  echo $child->getName() . ": " . $child . "<br />";
  }
My Xml file :
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product>
<product_name>testproduct2</product_name>
<product_creation_date>2001-25-02</product_creation_date>
<product_expiration_date>2004-25-02</product_expiration_date>
<product_batch_number>55441122336699887453152</product_batch_number> 
<product_serial_number>123456987789654123258964123</product_serial_number>
<product_info>This is the second test product, pd from xml file</product_info>
</product>
Now I need to insert the values of the xml child nodes into my mysql database. How can I do this ?

Thank you