Wrox Programmer Forums
|
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 09:02 AM
Registered User
 
Join Date: Sep 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML in Websites

Hello everyone,

This is a general question so I hope I am posting it in the write place. I have a fair knowledge of HTML, CSS and PHP and I have built a couple of websites for different reasons but now I have to build a very professional website and I am wondering about what is the best technology to use. So my question is why should I use XML in websites rather than using HTML and whats the benefit of that?

regards,
 
Old March 22nd, 2006, 09:17 AM
Authorized User
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's been well over a year since I looked into doing xml web pages and, just yesterday, decided to look into this again. I've forgotten quite a few things. XML is great for producing human readable data and keeping it organized. It is especially helpful for keeping 'content' seperate from 'presentation' because you aren't concerned with presentation while creating the XML document. So it becomes easier to manipulate the XML as data than if it were all created using HTML and its inherent, automatic styling with <p> tags, headings, divs and so on.

One very important point is, eventually, all web pages will be produced with XML as the output. XHTML is the method to replace HTML as we all transition to XML but whether browsers are ready for all this now is what I question. All the major browsers seem to handle XML just fine. IE can't handle XHTML, and no one, including Microsoft, knows when it will.

 
Old March 22nd, 2006, 12:46 PM
Registered User
 
Join Date: Sep 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Thanx for your reply but I have a couple of follow up questions:

You said: "It is especially helpful for keeping 'content' seperate from 'presentation' ...". Doesnt using CSS do the same job?

You have mentioned: "IE can't handle XHTML, and no one, including Microsoft, knows when it will " but on the W3C website they say : "XHTML is compatible with HTML 4.01. All new browsers have support for XHTML. XHTML is supported" They also say: " XHTML pages can be read by all XML enabled devices AND while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible !!!".

I seem to be confused between XML and XHTML. XHTML is an XML language but if when I say that a certain website was built using XML does that mean that it was built using XHTML?

Regards,
 
Old March 22nd, 2006, 01:10 PM
Authorized User
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

CSS is the presentation part and is used to style the XML document. Internet Explorer does not understand the application/xhtml+xml MIME type. Only modern browsers do but, typically, servers are serving XHTML as MIME type text/html. iow, it treats your XHTML as regular HTML and just deals with it.

Firefox, Opera and Safari all handle the application/xhtml+xml properly and can display XHTML. I can link you to Microsofts IEBlog where this is discussed.

XHTML is HTML reformulated with an XML document using a custom DTD. However, if someone tells me they have a XML web page, I assume it is all XML and not XHTML.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Asp 2.0 websites jeffryokusa ASP.NET 2.0 Basics 2 November 14th, 2005 01:20 PM
JSP Tutorial websites?? cyrusds_asp JSP Basics 2 September 2nd, 2005 02:08 AM
loading websites from a template olambe ASP.NET 1.x and 2.0 Application Design 3 September 6th, 2004 02:00 PM
Flash Websites Ben Horne Flash (all versions) 2 March 24th, 2004 05:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.