Home > Articles > Programming > Web Services/ XML/ SOA/ WebSphere/ WCF

Optimized Presentation of XML Content

Ivan Pepelnjak
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Close WindowIvan Pepelnjak

Ivan Pepelnjak

Learn more…

Find Facebook Friends with Your Facebook Connect Application
Dec 28, 2009
Publish Your Application Stories to Facebook
Oct 21, 2009
Use Facebook Connect to Bring Your Application to Millions of Users
Aug 31, 2009
Developing AJAX Applications with jQuery
Jun 30, 2009
Web Page Refactoring with jQuery
Jun 10, 2009
Introduction to jQuery: Use jQuery to Write Simpler, Shorter, More Readable JavaScript Code
Jun 1, 2009
Testing Your Website in a Realistic Environment
Aug 5, 2008
Fix Your Web Site Performance Problems
Jul 30, 2008
Why Is My Web Site So Slow for Global Visitors?
Jul 21, 2008
Generating Atom Feed from SQL Data
Mar 31, 2008
Implementing Access Controls on SQL Server Data
Mar 14, 2008
Make Your Web Pages Mobile-Friendly
Jan 18, 2008
Use Google as Your Gateway to the Mobile Internet
Dec 28, 2007
Enhance Your AJAX Applications with Visual Cues
Dec 14, 2007
Building Modal Dialogs into Your Web Application
Nov 9, 2007
Adding Keyboard Shortcuts to Your Web User Interface
Nov 2, 2007
XML Handling in Microsoft SQL Server 2005
Oct 19, 2007
Storing XML Data in a Relational Database
Oct 5, 2007
Serve SQL Data in XML Format
Sep 28, 2007
Enrich Your HTML Tables with JavaScript Progressive Enhancement
Sep 7, 2007
Introduction to HIJAX
Aug 24, 2007
Seven Common CSS Mistakes and How to Avoid Them
Jul 20, 2007
JavaScript Progressive Enhancement in Practice
Jun 15, 2007
Make Pop-Up Windows Visible to Search Engines
Feb 16, 2007
Automate the Pagination of Your Web Pages
Feb 2, 2007
Using WordProcessingML to Generate Clean HTML from Word
Jan 26, 2007
Optimized Presentation of XML Content
Dec 15, 2006
Reap the Benefits of Web Caching, Part 3: Database Integration
Nov 22, 2006
Reap the Benefits of Web Caching, Part 2: Reduce the Download Time
Nov 17, 2006
Reap the Benefits of Web Caching, Part 1: Explicit Content Expiration
Oct 27, 2006
Improve Your Search Engine Ranking with AJAX
Jul 28, 2006
Using Multicast Domains
Jun 27, 2003
Should I Be Interested in MPLS Traffic Engineering?
Jan 3, 2003
Is Troubleshooting Important?
Dec 27, 2002
MPLS/VPN Architecture Overview
Aug 2, 2002
Multiprotocol Label Switching (MPLS) Architecture Overview
Jan 1, 2001
JavaScript Modal Dialog Box in a Frameset Environment
By on December 12, 2007 1 Comment

Only a few modifications are needed to adapt the solution I've described in the Building Modal Dialogs into Your Web Application to a frameset environment.

Ivan Pepelnjak shows how to optimize the process of converting XML back-end data stored on a web server into HTML markup displayed in a web browser.

Introduction

The internal representation of static web site content or dynamic data displayed on a web site is increasingly stored in XML format due to ever-widening support of XML in scripting languages, web browsers, and SQL databases. Before this semantically structured data is presented to the end user, it’s almost always transformed into browser-friendly HTML markup.

There are many ways to perform XML-to-HTML transformation. Sometimes programmers use XML Document Object Model (DOM) calls in web server scripts to extract individual fields and attributes from the XML data and insert them into an HTML template. Similarly, some AJAX solutions download XML data to the browser and perform the copy/paste operations there. More advanced engineers usually tap the power of XSLT to handle XML-to-HTML transformations on the web server or within JavaScript code on browsers supporting XSLT.

All of these solutions are suboptimal for the following reasons:

  • If you perform XML-to-HTML conversion on the web server, you’re wasting server CPU cycles and increasing the page download time. (HTML output is almost always significantly larger than the corresponding XML data.)
  • If you perform the conversion on the web browser within an AJAX framework, the web pages are not visible to search engines, older browsers, or users who have disabled JavaScript.

In the following sections, you’ll learn how you can use the XSLT technology to reduce the document download time and server CPU utilizations for most of your visitors, while at the same time retaining compatibility with older browsers and ensuring visibility to search engines.

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

Jennifer  BortelWin FREE iPhone Developer Books and Videos- Introducing @InformIT Giveaways
By Jennifer Bortel on February 5, 2010 No Comments

Apples’s recent iPad announcement made our hearts flutter so we couldn’t resist making an announcement of our own!

Today marks the first ever @InformIT Giveaway!

We’ll regularly post a video like this one profiling spectacular prizes we’re giving away—from books and videos to T-shirts and other exciting stuff. Check out the video below to see the giveaways for today, and then scroll down for more prize details and instructions on how to win them!

Dustin Sullivan"Every OSX developer should have this book on their desk."
By Dustin Sullivan on February 1, 2010 No Comments

That was the sentence Mike Riley ended his recent Dr Dobb's CodeTalk review of Cocoa Programming Developer's Handbook with.

David ChisnallCocoa Tip of the Day, 1/29/10
By David Chisnall on January 29, 2010 No Comments

Don't ignore old versions of OS X.

See All Related Blogs

Informit Network