I am passing HTML source code that i have retrieved from a webpage into a DOM Document object using:
[code]
$dom = new domDocument;
$dom->loadHTML($source);
The problem i am getting is when i run the code i get errors such as:
ID week-1 already defined in Entity, line: 126.
htmlParseEntityRef: no name in Entity, line: 303.
Am i right in thinking this is DOMDocument having problems parsing the source I’ve acquired?
If so, is DOMDocument strict to the DOCTYPE specified in the HTML? as i have checked this webpage with W3C and the page contains 303 errors when checking against the DOCTYPE specified.
I feel the DOCTYPE errors may be causing my problems, but im unsure.
I would appreciate your thoughts,
Thanks