Page 1 of 1
Call to undefined function domxml_new_doc()
Posted: Tue Aug 09, 2011 1:32 am
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?

Re: Call to undefined function domxml_new_doc()
Posted: Tue Aug 09, 2011 6:09 am
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.