Use #text for text nodes content
[pazpar2-moved-to-github.git] / js / pz2.js
index 3804d1a..bad26ac 100644 (file)
--- a/js/pz2.js
+++ b/js/pz2.js
@@ -250,6 +250,7 @@ pz2.prototype =
         this.termCounter = 0;
         this.bytargetCounter = 0;
         this.statCounter = 0;
+        this.activeClients = 1;
         
         // no proxy mode
         if( !this.initStatusOK )
@@ -966,7 +967,7 @@ Element_parseChildNodes = function (node)
     // if no nested elements, get text content
     if (node.hasChildNodes() && !hasChildElems) {
         if (node.attributes.length) 
-            parsed['textContent'] = node.firstChild.nodeValue;
+            parsed['#text'] = node.firstChild.nodeValue;
         else
             parsed = node.firstChild.nodeValue;
     }