Page 1 of 1

PHP DOM vs DOM/XML

Posted: Sat Jul 22, 2006 4:06 am
by Shendemiar
My homepages php is 4.4.2. It doesnt have plain DOM, but a DOM/XML.

It doesnt say in php.net if the plain DOM is php4 or php5 feature. Can i get plain DOM in php 4.4.2?

Is it worth starting to do something with DOM/XML?

Whats the difference between these?

Doesnt this mean it doesnt understan a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> ive written?

Code: Select all

$xml_string = "<?xml version='1.0'?>
<sentence>What a wonderful profusion of colors and smells in the market -
   <vegetable color='green'>cabbages</vegetable>,
   <vegetable color='red'>tomatoes</vegetable>,
   <fruit color='green'>apples</fruit>,
   <vegetable color='purple'>aubergines</vegetable>,
   <fruit color='yellow'>bananas</fruit>
</sentence>";

$doc = new DOMDocument();
$doc->loadXML($xml_string);
echo $doc->saveXML();
But how come it knows domdocument, but not loadXML ?

Posted: Wed Aug 02, 2006 4:16 pm
by kendall
PErsonally I'd use PHP 5 its the best with XML

but since many of my clients us a 4.3 i try to actually use XML/XSL

this is just me...PHP < 5 XML functions SUCK!!