diff --git a/ajax+json/ajax.php b/ajax+json/ajax.php index 869f071..89ec70a 100644 --- a/ajax+json/ajax.php +++ b/ajax+json/ajax.php @@ -24,7 +24,7 @@ class dummy extends c_xmlify $this->var1 = $v1; $this->var2 = $v2; $this->var3 = $v3; - $this->var4 = $v4; + $this->var4 = array ($v4, $v4); } }; diff --git a/js/xmlify.js b/js/xmlify.js index fde3a53..96e349a 100644 --- a/js/xmlify.js +++ b/js/xmlify.js @@ -52,7 +52,7 @@ nBildertool.xmlToObjectArray = function (data) case 'class': var cName = child.getAttribute ('class'); - if (typeof (eval (cName)) === 'function') + if (eval ('typeof (' + cName + ') === \'function\'')) ret[name] = eval ("new " + cName + "(child)"); else ret[name] = nBildertool.xmlToObjectArray (child); @@ -93,10 +93,10 @@ nBildertool.xmlToArray = function (data) case 'class': var cName = child.getAttribute ('class'); - if (typeof (eval (cName)) === 'function') - ret[key] = eval ("new " + cName + "(child)"); + if (eval ('typeof (' + cName + ') === \'function\'')) + ret[key] = eval ("new " + cName + "(_child)"); else - ret[key] = nBildertool.xmlToObjectArray (child); + ret[key] = nBildertool.xmlToObjectArray (_child); } } } @@ -130,7 +130,7 @@ nBildertool.c_xmlify = function (data) case 'class': var cName = child.getAttribute ('class'); - if (typeof (eval (cName)) === 'function') + if (eval ('typeof (' + cName + ') === \'function\'')) this[name] = eval ("new " + cName + "(child)"); else this[name] = nBildertool.xmlToObjectArray (child); @@ -154,7 +154,7 @@ nBildertool.deXmlify = function (data) case 'class': var cName = child.getAttribute ('class'); - if (typeof (eval (cName)) === 'function') + if (eval ('typeof (' + cName + ') === \'function\'')) ret = eval ("new " + cName + "(child)"); else ret = nBildertool.xmlToObjectArray (child);