How would I check if an XML element exists in PHP?
Sorry guys. Same script, different problem. Google is no help.
Here is the script.
The script pulls out the “when” element and its attributes. The problem is that not every entry has a when element. How can I skip these records? I am aware of a hasAttribute function, but I can’t seem to find any equivalent for elements. I’ve played around with several techniques, and nothing has worked.
If these entries are not skipped, the following error occurs:
Fatal error: Call to a member function getAttributeNode() on a non-object
This question is in the General Section. Responses must be helpful and on-topic.