Fatal error: Call to undefined method DOMNodeList::getElemen
Posted: Thu Sep 18, 2008 2:31 am
Folks,
This is driving me crazy. I have PHP5.2.6 running on linux and have DOM enabled as shown below in my phpinfo call:
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.32
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
The simple PHP code below gives me the following error:
"Fatal error: Call to undefined method DOMNodeList::getElementsByTagName()"
$dom = new DomDocument();
$dom->load("articles.xml");
$titles = $dom->getElementsByTagName("title");
foreach($titles as $node) {
print $node->textContent . " ";
}
Can anyone shed some light on this? Thanks a ton.
KD
This is driving me crazy. I have PHP5.2.6 running on linux and have DOM enabled as shown below in my phpinfo call:
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.32
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
The simple PHP code below gives me the following error:
"Fatal error: Call to undefined method DOMNodeList::getElementsByTagName()"
$dom = new DomDocument();
$dom->load("articles.xml");
$titles = $dom->getElementsByTagName("title");
foreach($titles as $node) {
print $node->textContent . " ";
}
Can anyone shed some light on this? Thanks a ton.
KD