 +    }
    }
  ?>
-Index: skeleton/xml/dom/Document.class.php
-===================================================================
---- skeleton/xml/dom/Document.class.php	(revision 14454)
-+++ skeleton/xml/dom/Document.class.php	(working copy)
-@@ -33,15 +33,18 @@
-      */
-     protected function _getElementsByTagName($node, $tagname, $max= -1) {
-       $r= array();
--      foreach (array_keys($node->children) as $key) {
--        if ($tagname == $node->children[$key]->getName()) {
--          $r[]= $node->children[$key];
-+      foreach ($node->children as $child) {
-+        if (!$child instanceof Node) continue;
-+        
-+        if ($tagname === $child->getName()) {
-+          $r[]= $child;
-           if ($max > 0 && sizeof($r) >= $max) return $r;
-         }
--        if (!empty($node->children[$key]->children)) {
-+        if (!empty($child->children)) {
-           $r= array_merge($r, $this->_getElementsByTagName(
--            $node->children[$key], 
--            $tagname
-+            $child, 
-+            $tagname, 
-+            $max- sizeof($r)
-           ));
-         }
-       }
-@@ -59,20 +62,19 @@
-      */
-     protected function _getElementsByAttribute($node, $attribute, $name, $max) {
-       $r= array();
--      foreach (array_keys($node->children) as $key) {
--        if (
--          ($node->children[$key]->hasAttribute($attribute)) &&
--          ($name == $node->children[$key]->getAttribute($attribute))
--        ) {
--          $r[]= $node->children[$key];
-+      foreach ($node->children as $child) {
-+        if (!$child instanceof Node) continue;
-+
-+        if ($child->hasAttribute($attribute) && ($name === $child->getAttribute($attribute))) {
-+          $r[]= $child;
-           if ($max > 0 && sizeof($r) >= $max) return $r;
-         }
--        if (!empty($node->children[$key]->children)) {
-+        if (!empty($child->children)) {
-           $r= array_merge($r, $this->_getElementsByAttribute(
--            $node->children[$key], 
-+            $child, 
-             $attribute, 
-             $name,
--            $max
-+            $max- sizeof($r)
-           ));
-         }
-       }
 Index: skeleton/xml/Element.class.php
 ===================================================================
 --- skeleton/xml/Element.class.php	(revision 0)


Index: ports/classes/net/xp_framework/unittest/xml/NodeTest.class.php
===================================================================
--- ports/classes/net/xp_framework/unittest/xml/NodeTest.class.php	(revision 14454)
+++ ports/classes/net/xp_framework/unittest/xml/NodeTest.class.php	(working copy)
@@ -208,6 +208,54 @@
     }

+    }
   }
 ?>
Index: skeleton/xml/Tree.class.php
===================================================================
--- skeleton/xml/Tree.class.php	(revision 14616)
+++ skeleton/xml/Tree.class.php	(working copy)
@@ -7,7 +7,9 @@
   uses(
     'xml.parser.XMLParser',
     'xml.Node',
-    'xml.parser.ParserCallback'
+    'xml.parser.TreeParser',
+    'xml.parser.StringInputSource',
+    'xml.parser.FileInputSource'
   );
  
   /**
@@ -18,16 +20,11 @@
    * @see      xp://xml.parser.XMLParser
    * @purpose  Tree
    */
-  class Tree extends Object implements ParserCallback {
