I am running into some strange behaviors when using the dnn.xml and dnn.xml.jsparse namespaces. Let me first start with the dnn.xml. In my javascript, this is the code:
var oDoc = new dnn.xml;
oDoc.init();
oDoc.loadXml(sXml);
When the init function runs, it determines the browser type and loads the appropriate parsing type (i.e. MSXML, DOMParse, or JsParse). The challenge I run into is that with IE, the parserName is "ActiveX", so it will load the default JsParse and error out because the dnn.xml.jsparse namespace has not been loaded. By writing this, it has got me thinking again. This maybe associated with the order of loading the dnn.xmlhttp and the dnn.xml namespace. So, I will continue the next strange behavior I am experiencing.
When using the dnn.xml.jsparse namespace with Opera browser, I am not getting the data out of the nodes as expected. For example, with IE and Firefox, I can use this javascript to retrieve data from a xml document. Here is the code:
//this is the xml string
<name>
<test>
<1>One</1>
</test>
</name>
// this is the javascript
var oDoc = new dnn.xml;
oDoc.loadXml(sXml);
var myvariable = oDoc.childNodes(0).childNodes(0).getXml();
//results of code
The result of myvariable is "One" for IE and Firefox. For Opera, whom uses the jsparse, returns "". After futher investigation, I have discoverd the problem. This is the structure of the xml doc:
<name>
<test>
<1></1>
One
</test>
</name>
So, my impression that the jsparse is not populating the oDoc object in the same manner that the ActiveX or DomParser is performing. I have started rewriting the jsparse, but then I stopped to get input if I am barking up the wrong tree. I haven't seen any talk with regards to the actual namespaces and actual usage. I am hoping this note could spawn some dialog.
Thanks,
Phebous...