XML Data to Database using PHP

PEAR, Smarty, ADOdb, OOP, PHP 5, XML, UML, Şabloane de proiectare, PHP-GTK.

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

Mesajde navioo.com » Lun Sep 29, 2008 3:22 pm

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
Ultima oară modificat Lun Sep 29, 2008 7:17 pm de către navioo.com, modificat 1 dată în total.



Avatar utilizator
Amenthes
Senior Member
Mesaje: 1370
Membru din: Lun Dec 12, 2005 8:00 am
Contact:

Mesajde Amenthes » Lun Sep 29, 2008 4:03 pm

I'm under construction |


Înapoi la “PHP Avansat”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 4 vizitatori