-
31 Oct 2006 11:35 AM #1
Parsing response.responseXML in a browser-independent way
Parsing response.responseXML in a browser-independent way
I am using YAHOO.util.Connect.asyncRequest method and get response with the following response.responseText value:
How can I retrieve the following part of xmlCode:<?xml version="1.0" encoding="UTF-8"?> <data> <![CDATA[ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > <param name="allowScriptAccess" value="sameDomain" /> </object> ]]> </data>
in a browser-independent way?Code:<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > <param name="allowScriptAccess" value="sameDomain" /> </object>
response.responseXML.text works fine in IE and Opera, but doesn't work in FF
response.responseXML.documentElement.textContent works fine in FF and Opera but doesn't work in IE
Is there a way to parse response.responseXML in a browser-independent way?
-
31 Oct 2006 2:43 PM #2
You could try:
response.responseXML.getElementsByTagName('data')[0].firstChild.nodeValue;
Obviously not ideal but it should work.
-
31 Oct 2006 4:32 PM #3
or
not sure if the Mozilla way works in Safari tooCode:var s =''; if (result.responseXML.xml) s = result.responseXML.xml; // IE else s = (new XMLSerializer()).serializeToString(result.responseXML); // Mozilla
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
17 Feb 2012 6:37 AM #4
Thank You Jack ! Your post helped me

I'm using Sencha Touch 2 Beta 2 and not sure which functions can be used with it and which can not.
- Sachin Warke
Similar Threads
-
Wrong charset when reading response from POST...
By gizzmo in forum Ext 1.x: Help & DiscussionReplies: 20Last Post: 28 Aug 2007, 8:11 AM -
Will Ext 1.0 be independent from YUI?
By schmidetzki in forum Community DiscussionReplies: 1Last Post: 12 Feb 2007, 2:22 PM -
Layout urgent response needed !!!!!!!
By stalin in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 12 Feb 2007, 6:33 AM -
PHP response
By zquirm in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 11 Nov 2006, 3:02 AM


Reply With Quote