Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why XML

Status
Not open for further replies.

Devdatta

Programmer
Oct 17, 2001
2
JP
Hi
I have a very basic question about XML. I understand its importance regarding data interoperability. But in most of the case studies i read it is said that the main advantage of using XML is to seperate Data from the Presentation Layer. Now even if we use any web technologies like ASP or JSP we already seperate Data from the Presentation layer. Then why do we need to convert the data into XML and then transform it using XSL to create a HTML output.

Kindly Reply
Regards
Devdatta
 
the presentation layer is about more than html tho.
an ASP or JSP script may well have to generate the XML but for the guy who has to code the script, his job ends there. i could then download the xml files and convert them into my own pages or convert them into ascii text for emails or even convert to another xml format to pass on to someone else.
but if the scripts produced html i'd have to know the exact layout to be able to pull out the correct data, and if the webpage changed style i'd have problems.
obviously making xml and then converting it is less efficient than just making html and this depends on your requirements. i've been in the situation before where i've created one script to pull data from a db and then have two render classes, one for html and one for xml. this is bcos html is the main output format so i wanted that to be quickest.
 
Hi Tom
Thanks for the immediate reply. i had one more question. Is XML going have any role while passing data between the devices like Mobile to PDA or PC to Mobile?

Regards,
Devdatta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top