>BTW, is there an easy way to get the total amount of items in a curent node? count ( $nodeElement -> parentNode -> childNodes ) always returns 1. For now the only solution I know of is looping through the nodeElements (e.g. foreach ( $nodeElement as $value ) and have a counter inside the loop. The way I did this (unfortunately in another language) was to write a recursive function that traveled to the end counting along the way and then returned the count. hth's tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php