resources/roo.builder.js
authorAlan Knowles <alan@roojs.com>
Wed, 27 Aug 2014 07:58:44 +0000 (15:58 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 27 Aug 2014 07:58:44 +0000 (15:58 +0800)
resources/roo.builder.js

index a520076..1a52c2e 100644 (file)
@@ -94,10 +94,10 @@ Builder  = {
             while (currentElementChild) {
                 // Formatting code (indent the tree so it looks nice on the screen)
                 
-                if  (currentElementChild.node_name == '#text') {
-                    cb(currentElementChild.node_value);
+                if  (currentElementChild.nodeName == '#text') {
+                    cb(currentElementChild.nodeValue);
                     i++;
-                    currentElementChild=currentElement.child_nodes.item(i);
+                    currentElementChild=currentElement.childNodes.item(i);
                     continue;
                 }   
                 allText = false;
@@ -111,7 +111,7 @@ Builder  = {
                 // Recursively traverse the tree structure of the child node
                 this.traverseDOMTree(cb, currentElementChild, depth+1);
                 i++;
-                currentElementChild=currentElement.child_nodes.item(i);
+                currentElementChild=currentElement.childNodes.item(i);
             }
             if (!allText) {
                     // The remaining code is mostly for formatting the tree