Call to undefined function domxml_new_doc()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Lphp
Forum Commoner
Posts: 74
Joined: Sun Jun 26, 2011 9:56 pm

Call to undefined function domxml_new_doc()

Post by Lphp »

I try the example in http://code.google.com/apis/earth/artic ... earth.html
Call to undefined function domxml_new_doc()
How to deal with this? :?
Dodon
Forum Commoner
Posts: 64
Joined: Wed Aug 03, 2011 4:11 am
Location: Netherlands

Re: Call to undefined function domxml_new_doc()

Post by Dodon »

If you read the example in the link you gave you would see:
Check your configuration or try initializing a domxml_new_doc() to determine if your server's PHP has dom_xml functionality on.
apperently it fails, so that means you don't have the dom_xml functionality.

A little bit lower in the same example:
If you don't have access to PHP's dom_xml functions, then you can simply output the XML with the echo function. When using just the echo function, you'll need to use a helper function (e.g. parseToXML) that will correctly encode a few special entities (<,>,",') to be XML-friendly.
Post Reply