note 46028 deleted from ref.dom by didou

From: Date: Fri, 17 Dec 2004 11:38:54 +0000
Subject: note 46028 deleted from ref.dom by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81903@lists.php.net to get a copy of this message
Note Submitter: dn at NOSPAM dot xbe dot ch ---- the w3c stuff seems to be a little bad-concepted.. - there seems to be no easy way get an array of all available attributes of a given node/element. i didn't find it here nor in the w3c dom2 specification. - the php documentation doesn't really cover ANY attributes which some objects have - and they are really important. example if you wish to get an element and simply print out its content (with some error checking): <?php $el = $xml->getElementsByTagName("tagname"); if(count($el)<1) { return false; }else{ foreach($el as $val) { echo $val->firstChild->nodeValue; } } ?> as you see, you have to go always through firstChild and it's attribute nodeValue to get the desired value as mentioned, the attributes of each object type should be documented as they're very important. i would document them if i would know them....... ;)

« previous php.notes (#81903) next »