On Apr 6, 2006, at 8:47 PM, Scott Reynen wrote:
> On Apr 6, 2006, at 5:25 AM, Danny Ayers wrote:
>>>> I'm not sure I understand why Matt suggests XML data might have to be
>> delivered as both XML and escaped as well, but he gets into
>> browser/DOM territory, a place presumably well-known around this list
>> - thoughts appreciated.
>>>> I don't understand everything Matt says, but what I do know might
> help: browsers use different DOMs, with different functionality, for
> XML or HTML. The HTML DOM is generally easier to use, sometimes even
> for XML data. For example, if you treat XHTML as XML, you can't use
> most getElementsByClassName() functions on it, which makes parsing
> microformats much more difficult. But if you just dump the raw text
> of the same XML in the .innerHTML of some HTML node (even one that
> isn't in the document tree), you can use the full range of HTML DOM
> functions on it.
>
Treating XHTML as HTML is losing all of the benefits of using XHTML, and
theoretically opens you up to parsing errors. If you're going to use
the HTML
DOM, why not use HTML, instead of causing potential breakage and
confusion
in the future when browsers may (or may not) become more strict in their
handling of these two different languages?
--
Ryan Cannon
Interactive Developer
MSI Student, School of Information
University of Michigan
http://RyanCannon.com/