homepage Welcome to WebmasterWorld Guest from 54.234.74.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
XML/XSL best method to display a record set?
what are the pros ands cons of using xml/xsl
skeletor




msg:3723822
 2:06 pm on Aug 15, 2008 (gmt 0)

Lets say I've got a database full of movie titles and web page that lets you search it. When someone does a search there are two ways I'm thinking of to display the results.

One is to return the results in a record set, and then just use server side scripting to loop through them and add each one in the html.

The other option is to have the database return the results in XML format and use an xsl to display them.

What are the pros and cons of these methods and which is best from a speed/efficiency point of view?

 

httpwebwitch




msg:3725160
 11:41 pm on Aug 17, 2008 (gmt 0)

using XML/XSL
pros:
- easy to transform the data into a variety of formats and alternative HTML layouts
- improved ease of maintainance
- the data is ripe for offering as a public API
- you're less likely to allow XSS vulnerabilities
- the XSLT layer offers separation from the data access layer

cons:
- it is more expensive in terms of CPU/memory. (But not by that much)
- XSLT has a challenging learning curve
- dealing with data that contains escaped characters and text/html markup can be challenging (just make sure your test data contains lots of nasty tainted stuff, so your code handles it properly)

seodreamer




msg:3725411
 10:43 am on Aug 18, 2008 (gmt 0)


If you just have a db full of movie titles then why not use asp.net and fetch data directly into a DataSet then bind it to a control such as a GridView. Takes about 3 lines of code, no xml and no server side scripting to loop through them. Easy!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved