RE: XML DOM issues in IE and Opera
"Grant Mackenzie" <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <000001c5e292$24543c50$a2e931ca@featon> |
>Then use dom.selectSingleNode. That works for all. I would hope! Umm no! This is the MSXML xPath resolver.. which predates DOM 3 http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html Although DOM 3 hasn't yet been yet standardised, as is just a 'W3C Working Group Note 26 February 2004', it has been implemented by Firefox... http://www-xray.ast.cam.ac.uk/~jgraham/mozilla/xpath-tutorial.html If you like .selectSingleNode() and .selectNodes() Prototype it for Firefox... Using their xpath resolver http://km0ti0n.blunted.co.uk/mozXPath.xap Or Prototype other way around... http://sourceforge.net/projects/html-xpath/ Take care Grant -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Lon Boonen Sent: Sunday, November 06, 2005 1:12 PM To: [email protected] Subject: RE: [wdf-dom] XML DOM issues in IE and Opera ________________________________ From: [email protected] on behalf of Jim Auldridge Sent: Sun 06/11/2005 01:05 To: [email protected] Subject: Re: [wdf-dom] XML DOM issues in IE and Opera Grant, Thanks for the words about nodeFromID in IE. I just can't understand why anyone bothers to contiue writing and publishing standards if the industry is going to conitue to ignoring them. I've got more forks in my code than my silverware cabinet. :( I still can't get Opera to work...not that I am terribly concerned about it. It just eats me up to not have a single block of code work in all JS environments.. Thanks, Jim On 11/5/05, Grant Mackenzie <[email protected]> wrote: > Hi Jim > > DOM standard doc.getElementById('code1'); > Whereas the MSXML parser uses nodefromID() > "To reference a node with nodefromID, the node must be typed as ID in > the schema or document type definition (DTD)." > > Other differences// > > "Firefox does not support DTD validation or any of the other > validation technologies such as W3C XML Schema (WXS) or RELAX NG." > http://www-128.ibm.com/developerworks/web/library/x-ffox15.html?ca=dgr > -l > nxw03FFoxXMLP1 > > Unlike Firefox xml parser > MSXML is a validating parser .... > This is standard xml validator parser practice. > If not wellformed & valid xml ... halt-abort then throw error The > type of error is left up to the implementor > > Firefox xml parser can not validate so documents must be only well > formed. > > var xParser = new ActiveXObject("Msxml2.DOMDocument.4.0"); > xParser.validateOnParse = false; > > Will result in a xml parse which doesn't try to validate... Like > firefox > > xParser.resolveExternals = false; > Won't try to resolve the DTD delared entities > > A xml parser can read a DTD and know ID without validating > so you can use > doc.getElementById() -fork- nodefromID() > Without validating > > > Always instantiate and use MXML4 ... latest version > MSXML3 is old, buggy and out of date > MXML4 contains many bug fixes, there is no excuse for not using it... > > I'm not sure what XML parser Opera uses > > Take care > Grant > > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Jim Auldridge > Sent: Sunday, November 06, 2005 1:38 AM > To: [email protected] > Subject: [wdf-dom] XML DOM issues in IE and Opera > > > I am having a problem working with DOM methods in an XML document in > IE and Opera. > > If you go here: > http://www.jaaulde.com/test_bed/XML-DOM/ > and click the button at the top, my AJAX library get's and XML > document, and you should see the 5 boxes fill in with appropriate > data. > > That data is, in order, the headers returned when the AJAX request > kicked off, the responseText, the data type of the responseXML (should > be object) and the data type of responseXML.getElementById('code1') > (should be object), and the actual value of the text within the > element with ID 'code1'. (the element with the id 'code1' is one of > the error elements in the XML) > > The only place this is working correctly is Firefox. So if you want to > see the correct thing, use Fx. > > In IE everything is right until the last 2 boxes which are empty and I > get an error saying that the reponseXML document doesn't support the > method getElementById(). In Opera I get the same basic error, but the > second to last box is correct--it says object. So the last box doesn't > work right. > > So IE and Opera are not recognizing reponseXML as a XML document, or > at least not fully supporting the DOM. You can see in the headers that > the correct Content-Type (application/xml) is being sent. And I > manually set at the server to 'text/xml' to see if that was the issue, > but it is not. > > Does anyone know what gives?? I have debugged my little heart out. > > > Unsubscribe > [email protected] > > List info > http://www.quirksmode.org/dom/list.html > > > > SPONSORED LINKS Dom perignon Dom pedro lisboa Javascript dropdown menu > Javascript Dom perignon 1990 Javascript scroller > > > > YAHOO! GROUPS LINKS > > Visit your group "wdf-dom" on the web. > > To unsubscribe from this group, send an email to: > [email protected] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > > > > Unsubscribe > [email protected] > > List info > http://www.quirksmode.org/dom/list.html > Yahoo! Groups Links > > > > > > > Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links [Non-text portions of this message have been removed] Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html YAHOO! GROUPS LINKS Visit your group "wdf-dom" on the web. To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM --------------------------------------------------------------------~-> Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/