|
Prev: Need help understanding this part of code. Explanation in post (2008-04-18)
Next: “OpenOffice.org” free Office suite for Microsoft Windows, Linux, Solaris, BSD, OpenVMS, OS/2 or IRIX
From: RoLo on 18 Apr 2008 00:46 Is there anyway to use the html document on IE as an XML document?
From: Richard Cornford on 18 Apr 2008 01:22 "RoLo" wrote: > Is there anyway to use the html document on IE as > an XML document? Only a subset of HTML documents could pass XML's well-formed-ness rules (they could not include any elements with EMPTY content declarations, so no img, input, link or mata elements for a start, HTML's optional tags could not be omitted (except where both opening and closing tags can be omitted) and all attribute values would have to be quoted regardless of whether quoting them would have been unnecessary in HTML). I don't see what being "on IE" would have to do with anything, except that once a document is being rendered by IE using its - inner/outerHTML - properties as a source for the text that would be treated as XML would be a non-starter as there attributes that do not need to be quoted are almost never quoted. Richard.
From: RoLo on 18 Apr 2008 09:28 On Apr 18, 1:22 am, "Richard Cornford" <Rich...(a)litotes.demon.co.uk> wrote: > "RoLo" wrote: > > Is there anyway to use the html document on IE as > > an XML document? > > Only a subset of HTML documents could pass XML's well-formed-ness rules > (they could not include any elements with EMPTY content declarations, so > no img, input, link or mata elements for a start, HTML's optional tags > could not be omitted (except where both opening and closing tags can be > omitted) and all attribute values would have to be quoted regardless of > whether quoting them would have been unnecessary in HTML). I don't see > what being "on IE" would have to do with anything, except that once a > document is being rendered by IE using its - inner/outerHTML - > properties as a source for the text that would be treated as XML would > be a non-starter as there attributes that do not need to be quoted are > almost never quoted. > > Richard. ok, I understand your point, I should have been more specific... After the HTML is loaded... Is there anyway I could use the document as an XML document. In firefox, opera and safari the html document inherits their XML document methods. In IE it doesn't, at least I haven't found any direct way to this, so thats why Im asking.
From: Thomas 'PointedEars' Lahn on 18 Apr 2008 13:37 RoLo wrote: > After the HTML is loaded... Is there anyway I could use the document > as an XML document. In firefox, opera and safari the html document > inherits their XML document methods. No, it does not. It would seem that you either mistake the methods of DOM Level 2+ Core as being XML-DOM-specific, or you have not understood the difference between HTML and XHTML. > In IE it doesn't, at least I haven't found any direct way to this, > so thats why Im asking. IE does not implement W3C DOM Level 2 for the most part. You should ask *exactly* what you would like to know instead, and be prepared to answer the "Why?" question. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee
From: RoLo on 19 Apr 2008 13:21
On Apr 18, 5:34 pm, The Magpie <use...(a)pigsinspace.co.uk> wrote: > RoLo wrote: > > > ok, I understand your point, I should have been more specific... > > Actually, I think you miss the point if you don't mind me saying. The > point is that HTML is just not a valid XML format file. I think you > have misunderstood the difference between HTML (not valid XML) and > XHTML (which is more or less valid XML). Loaded or not does not make a > difference to its validity. whats so hard to understand about my question? "Is there anyway to use the html document on IE as an XML document?" "After the HTML is loaded... Is there anyway I could use the document as an XML document." can't you read "Is there ANYWAY" in both replies? "Loaded or not does not make a difference to its validity." I pointed out after load, because I can't use the DOM if the HTML source is not loaded in the browser. After all, this is a Javascript mailing list not an XML one! I know that copying the html document elements to a new xml document is possible but I was hoping there was a better way to do it for IE. After all FF,Opera and Safari kind of merges XML and HTML in their document DOM. http://developer.mozilla.org/en/docs/DOM:document In conclusion, the only way possible (at least the simplest way) on IE is by copying the HTML document into an XML document. |