简体   繁体   中英

How to solve “call to undefined function domxml_new_doc()…”

I am trying to output xml by using domxml_new_doc.

However, I just got the call to undefined function domxml_new_doc() error. I tried google it but still not luck. Do I have to install any extension or library? Thanks for the help.

 $doc=domxml_new_doc("1.0"); //error on this line....
$node=$doc->create_element("marker");
$parnode=$doc->append_child($node);

What PHP version are you using? You need to ensure that make sure you have the domxml library/extension.

you can see the requirements here . Quote:

This extension makes use of the » GNOME XML library. Download and install this library. You will need at least libxml-2.4.14. To use DOM XSLT features you can use the » libxslt library and EXSLT enhancements from » http://www.exslt.org/ . Download and install these libraries if you plan to use (enhanced) XSLT features. You will need at least libxslt-1.0.18.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM