Reply
XHTML & XML Confused
Old 04-18-2005, 10:32 AM XHTML & XML Confused
Extreme Talker

Posts: 172
Location: India
Hi, i'm a bit new to this complicated world of web designing, so this question might sound lot more sillier than the title.

Ok, i'm been reading about xhtml and xml. Now what i've gathered so far is that xml can store data. Now, lets say, i've got a site which gives news. Ok, so i've designed my xhtml files and put my data in an xml file. Now how do i make this data appear in the xhtml file. Besides, how does my xhtml code diffrentiate between the tags of xml and the normal tags.

The second thing I want to know is that what's so great about xhtml. So far i've connected that it validates your code. So basically now my code is well-formed. Is that it. I couldnt find a single tutorial which shows how a xhtml file makes use of customized dtd. Now i know that the xhtml file uses a doctype, but if the doctype used is provided by w3c, why should i learn about dtd?

Thanks in advance.
shashank_hi is offline
Reply With Quote
View Public Profile Visit shashank_hi's homepage!
 
When You Register, These Ads Go Away!
Old 04-18-2005, 11:25 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
have you checked out www.w3schools.com its a free site with loads of tutorials and information on xhtml, html, xml, java, CSS, etc etc....

xhtml is a language that is used to present information to an end user thru the use of a web browser...xml is a code that is both human and machine readable....xml allows you to make up your own tags and use them accordingly...xml doenst really do anything it is just a transporter of data, xhtml uses this data to display to the end user.... xhtml, html, xml and a few other codes are all off shoots of SGML or the Standard Generalized Markup Language....again information on all of this and tutorials on how to use it can be found at www.w3shools.com

You should learn doctypes because there is more than just one....there is multiple doctypes for xhtml and html 4.01, you need to learn the proper use of each in order to tell the end users browser how it should render your code... xhtml does not validate your code it is just a form of code...YOU must write valid code in order for it to validate.....

again check out www.w3schools.com using that site is extremly helpfull....

good luck

hope this helps
__________________
It Happens
FreelanceKillers.com
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-18-2005, 11:29 AM
Extreme Talker

Posts: 172
Location: India
Hey casa. Thanks for the link. I've checked out w3schools.com but i couldnt find a way to implement my tags that i've created in xml in a xhtml page.

Could you please help me with this.
shashank_hi is offline
Reply With Quote
View Public Profile Visit shashank_hi's homepage!
 
Old 04-18-2005, 12:21 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
I think you need to look up XSL, that is, if you want to format an XML document into (X)HTML.
Be warned... it's not for the weak-bowled.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-18-2005, 12:22 PM
chrishirst's Avatar
Super Moderator

Posts: 13,576
Location: Blackpool. UK
You use XSLT (XSL Transformation) W3Schools XSL to convert XML to (X)HTML
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-18-2005, 02:14 PM
Extreme Talker

Posts: 172
Location: India
Thanks everyone. XSLT looks good and tough. I made a search and found that PHP is widely used to parse XML data. Is this true? Also does the PHP file thats parsing XML have to have a doctype? And does this doctype, if its needed, should be somehow related to my XML? If yes, how?

I know its a lot of questions, but this is faster than you posting an answer and then i go all over again to ask a second one... <<<Yawn>>>
shashank_hi is offline
Reply With Quote
View Public Profile Visit shashank_hi's homepage!
 
Old 04-18-2005, 02:24 PM
chrishirst's Avatar
Super Moderator

Posts: 13,576
Location: Blackpool. UK
any server-side code can be used to parse and convert XML you can even use javascript (sort of). It's simply a matter of reading the tags and having the code output the appropriate (X)HTML.
Don't get hung up on doctypes if you use PHP/ASP etc to parse the XML you can output it in whatever version of HTML you choose to use as you are not feeding xml/xsl to the user-agent, you are feeding the script output.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-19-2005, 09:05 AM
Extreme Talker

Posts: 172
Location: India
Ok, so I can simply stack away doctypes for the moment, and concentrate on the script right. Thanks for your reply chrishirst.
shashank_hi is offline
Reply With Quote
View Public Profile Visit shashank_hi's homepage!
 
Reply     « Reply to XHTML & XML Confused
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.17030 seconds with 12 queries