Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 15th, 2013, 10:43 AM   #21
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: updating mysql records

hey so sorry about taking so long to respond.

Using simpleXMLelemnt gives me the same results as above and domdocument gives me the following:

Warning: DOMDocument::load(): PCDATA invalid Char value 3 in file:///C:/xampp/htdocs/NewSite/company/Product_Catalog.xml, line: 46223 in C:\xampp\htdocs\NewSite\hi.php on line 12

Warning: DOMDocument::load(): PCDATA invalid Char value 30 in file:///C:/xampp/htdocs/NewSite/company/Product_Catalog.xml, line: 56336 in C:\xampp\htdocs\NewSite\hi.php on line 12

Warning: DOMDocument::load(): PCDATA invalid Char value 3 in file:///C:/xampp/htdocs/NewSite/company/Product_Catalog.xml, line: 57595 in C:\xampp\htdocs\NewSite\hi.php on line 12

umm line 11 and 12 in code:
$xml = new DOMDOCUMENT();
$xml->load("company\Product_Catalog.xml");
origamiguy is offline   Reply With Quote
Old Sep 15th, 2013, 11:10 AM   #22
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: updating mysql records

notepad++ opens the file under "Encode in UTF8 without BOM" didn't know if this mattered...
origamiguy is offline   Reply With Quote
Old Sep 15th, 2013, 11:14 AM   #23
pritaeas
mod_pritaeas
 
Join Date: May 2009
Location: The Netherlands
Posts: 251
Rep Power: 9 pritaeas is on a distinguished road
Re: updating mysql records

That means the XML is invalid. Try this:
$dom = new DOMDocument("1.0", "utf-8");
$dom->recover = true;
$dom->strictErrorChecking = false;
$dom->loadHTML("company\Product_Catalog.xml");
pritaeas is offline   Reply With Quote
Old Sep 15th, 2013, 11:31 AM   #24
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: updating mysql records

no errors are showing!!! can you quickly explain what this is^^^

mainly recover and why we are loading it in as an html
origamiguy is offline   Reply With Quote
Old Sep 15th, 2013, 3:51 PM   #25
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: updating mysql records

changed your "$dom->loadHTML("company\Product_Catalog.xml");" to $dom->loadHTMLFILE("company\Product_Catalog.xml");

now i am still trying to traverse the document. not going so well...

EDIT:: i get this error for the line i changed for each piece of data i read in from the file

Warning: DOMDocument::loadHTMLFile(): Tag name invalid in company/Product_Catalog.xml, line: 8879 in C:\xampp\htdocs\NewSite\hi.php on line 8
origamiguy is offline   Reply With Quote
Old Sep 16th, 2013, 3:59 AM   #26
pritaeas
mod_pritaeas
 
Join Date: May 2009
Location: The Netherlands
Posts: 251
Rep Power: 9 pritaeas is on a distinguished road
Re: updating mysql records

Oh, the LoadHTML is a copy/paste error, it should work with load too. The other settings are there so DOMDocument tries to recover from some errors in the document.

What tag is on line 8879? Is the error still there after you switch to load() ?
pritaeas is offline   Reply With Quote
Old Sep 16th, 2013, 9:58 AM   #27
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: updating mysql records

it is all the tags. every line gives me this error. i just grabbed a random one to give you an example.
origamiguy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
awk - counting number of records and updating heading laperlenoire@gmail.com Sed and Awk 8 Dec 24th, 2012 4:43 AM
php mysql bulk records update? phantoma2 PHP 4 Feb 11th, 2012 9:10 AM
"Forbidden Page" while updating MYSQL using PHP chibib0 PHP 1 Jan 18th, 2009 12:56 AM
mysql get last 10 records in a table kruptof Other Web Development Languages 3 Jun 29th, 2007 9:23 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC