I have a task where i need to read data from XML Spreadsheet and store to Mysql Database.
While i was searchin google i got a link where he says the way to read data from XML Spreadsheet to Database
But there are few lines in the code where i don't have those functions. Also I don't know wheather they are predefined function from PHP Lib.
$dom = DOMDocument::load( $_FILES['file']['tmp_name'] );
$rows = $dom->getElementsByTagName( 'Row' );
while I run the Import.php page in the browser, I see
Call to a member function load() on a non-object in C:\xampp\htdocs\xampp\projects\xml_to_db\import.ph p on line 38
Also there is a line that says
$cells = $row->getElementsByTagName( 'Cell' );
and when i run this page also says
Call to a member function getElementsByTagName() on a non-object in C:\xampp\htdocs\xampp\projects\xml_to_db\import.ph p on line 38
I dont know where the function getElementsByTagName() is in the page give.
So Guys, Please help me regarding this, as do i need to do anything PHP.INI file inorder to run my dom functionality ( removing or puttin " ; " in front of the extensions ).
thanks & regards
XML Data to Database using PHP
Moderatori: coditza, Emil, Moderatori
-
navioo.com
- PHPRomania Supporter
- Mesaje: 9
- Membru din: Sâm Sep 20, 2008 5:46 pm
- Localitate: Montreal
- Contact:
XML Data to Database using PHP
Ultima oară modificat Lun Sep 29, 2008 7:17 pm de către navioo.com, modificat 1 dată în total.
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori