I'll create a new namespace QxXmlExtras for this to avoid collisions
with other libraries. Here is the patch:
Sebastian Werner schrieb:
Dietrich Streifert schrieb:
does not seem to be so.
Where would be the right place to put this in. In QxXmlExtras.js? Or
a new File QxXmlUtil.js?
QxXmlExtras is already existing and seems a good place. Just do it ;)
Sebastian
I would like to contribute a patch.
Dietrich Streifert schrieb:
Hello!
Is there a browser independant xml dom creation in qooxdoo?
Something like:
proto.createXmlDom = function() {
var xmlDom;
if (document.implementation &&
document.implementation.createDocument)
return document.implementation.createDocument("", "", null);
else if (window.ActiveXObject)
return new ActiveXObject("Microsoft.XMLDOM");
else {
throw('This browser does not support xmldom.');
return null;
}
return null;
};
Best Regards.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH
--- source/script/binding/QxXmlExtras.js.orig Fri Oct 28 22:39:37 2005
+++ source/script/binding/QxXmlExtras.js Thu Nov 10 10:25:00 2005
@@ -85,4 +85,28 @@
// not supported
serializeToStream: new Function
};
-};
+};
+
+
+// create a new Namespace
+QxXmlExtras = {};
+
+// create a xml dom node
+QxXmlExtras.createXmlDom = function() {
+
+ // the mozilla style
+ //
+ if (document.implementation && document.implementation.createDocument)
+ return document.implementation.createDocument("", "", null);
+
+ // the ms style
+ //
+ if (window.ActiveXObject)
+ return new ActiveXObject("Microsoft.XMLDOM");
+
+ // nothing apropriate found so throw an error
+ //
+ throw new Error("This browser does not support xml dom creation.");
+ return null;
+};
+