wcboyd Posted July 26, 2007 Share Posted July 26, 2007 Hello All, I am trying to extract certain pieces of data from an XML file. I need to go from start to finish in the file and repeatedly extract two elements from the file. Here is what I have so far, it is not much... <?php $xml = simplexml_load_file('c:\input.xml'); $fp1 = fopen('c:\output.txt'), 'w'); $num = 0; foreach ($xml->package->class->name as $RSMClassName) { fwrite($fp1 $RSMClassName); $xml->package->class->rdbPhysicalName as $TableName; fwrite($fp1 $Tablename); } fclose($fp1); ?> But I keep getting the following error: Parse error: syntax error, unexpected ',' in C:\createddlfromxml.php on line 4 What am I doing wrong? I am sure it is something simple..... Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.