tags:

views:

181

answers:

2

Hello guys. 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);
+1  A: 

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.

oezi
The website's downloaded page is a xmlsoft.org server with so many files..Would you tell me which one I should download it? Thanks...
Jerry
i don't know whats your servers OS... but if its any kind of linux, i think "libxml2-2.7.7.tar.gz" sounds good. maybe its also possible to install libxml/libxslt by using yast on your terminal...
oezi
ty. I just found out ibxml2-2.7.7.tar.gz is what I need..I say its a very poor organized website...Thanks though.
Jerry
+2  A: 

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

mmattax
I use php 5.2.0..
Jerry