0 down vote favoriteI want to insert multiple nodes values from multiple xml files into mysql using xpath method, code is as follows: \[code\]?php $path="fs/";$con = mysql_connect("localhost","sufi","1234"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con);if ( $handle = opendir($path) ) { $files = array(); while ( ($file = readdir($handle)) !== false ) { $files[] = $file; } sort($files); foreach ( $files as $file ) { $xml = simplexml_load_file("$file"); $products[0] = (string)current($xml->xpath("/sioct:BoardPost/sioc:content")); $products[1] = (string)current($xml->xpath("/sioct:BoardPost/dcterms:created")); $products[2] = (string)current($xml->xpath("/sioct:BoardPost/@rdfabout")); extract($products); mysql_query("INSERT INTO forum (txt_content,txt_date,txt_about) VALUES ( '".mysql_escape_string($products[0])."', '".mysql_escape_string($products[1])."', '".mysql_escape_string($products[2])."')" ); } } ?>\[/code\]but this gives me following errors: \[quote\] Warning: simplexml_load_file(.) [function.simplexml-load-file]: failed to open stream: Permission denied in C:\wamp\www\readfiles.php on line 22, Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "." in C:\wamp\www\readfiles.php on line 22, Fatal error: Call to a member function xpath() on a non-object in C:\wamp\www\readfiles.php on line 23.\[/quote\]Kindly suggest some way to handle this