initializing a 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

initializing a domxml_new_doc()

Post by Lphp »

I use php 5.3.1 , can any one tell me how to initializing a domxml_new_doc() :?:
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: initializing a domxml_new_doc()

Post by Celauran »

Code: Select all

$dom = domxml_new_doc('1.0');
Lphp
Forum Commoner
Posts: 74
Joined: Sun Jun 26, 2011 9:56 pm

Re: initializing a domxml_new_doc()

Post 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
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: initializing a domxml_new_doc()

Post 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');
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: initializing a domxml_new_doc()

Post by Weirdan »

DomXML is PHP4 only extension.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: initializing a domxml_new_doc()

Post by Celauran »

Ah, I only saw >= 4.2.0. I hadn't noticed the PHP 4 on the left menu.
Post Reply