Page 1 of 1

initializing a domxml_new_doc()

Posted: Mon Nov 07, 2011 4:33 am
by Lphp
I use php 5.3.1 , can any one tell me how to initializing a domxml_new_doc() :?:

Re: initializing a domxml_new_doc()

Posted: Mon Nov 07, 2011 5:28 am
by Celauran

Code: Select all

$dom = domxml_new_doc('1.0');

Re: initializing a domxml_new_doc()

Posted: Tue Nov 08, 2011 12:35 am
by Lphp
I get Fatal error: Call to undefined function domxml_new_doc() for$doc = domxml_new_doc("1.0");
I guest I need to do some configuration, how

Re: initializing a domxml_new_doc()

Posted: Tue Nov 08, 2011 7:03 am
by Celauran
Hmm. So do I, despite what the PHP site says. You could always use DOMDocument to achieve the same result.

Code: Select all

$xml = new DOMDocument('1.0');

Re: initializing a domxml_new_doc()

Posted: Tue Nov 08, 2011 10:14 am
by Weirdan
DomXML is PHP4 only extension.

Re: initializing a domxml_new_doc()

Posted: Tue Nov 08, 2011 10:16 am
by Celauran
Ah, I only saw >= 4.2.0. I hadn't noticed the PHP 4 on the left menu.