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…

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

Danny KalevMinutes from the October 2009 Meeting
By Danny Kalev on November 19, 2009 No Comments

The minutes from the Santa Cruz (October 2009) meeting are available here. Even if you're not a language layer at heart, I encourage you to read them.

Danny KalevA Reader's Opinion on Attributes
By Danny Kalev on October 20, 2009 No Comments

In August I dedicated a series to the debate about C++0x attributes. I believe that it covered the subject in a balanced and detailed way, but I keep getting complaints from C++ users who don't like attributes for various reasons. Here's a recent email I received from a Polish C++ programmer. While it  doesn't represent my opinion about attributes -- I'm rather neutral about this feature and consider it a "solution waiting for a problem" -- but it suggests that attributes are still a highly controversial issue that will haunt C++ for a long time. The email is quoted here with minor edits that and as usual, with all private details removed.

Danny KalevFollowup: The Web 2.0 Guy I Ain't
By Danny Kalev on October 16, 2009 1 Comment

Almost a year ago, I posted here The Web 2.0 Guy I Ain't. People wonder whether I still resist all those Web 2.0 features and technologies at the end of 2009.

See All Related Blogs

Informit Network