Skip to Content
XML Hacks
book

XML Hacks

by Michael Fitzgerald
July 2004
Intermediate to advanced
479 pages
12h 30m
English
O'Reilly Media, Inc.
Content preview from XML Hacks

Display an XML Document in a Web Browser

The most popular web browsers can display and process XML natively. Nowadays, it’s just a matter of opening a file.

XML is now mature enough that recent versions of the more popular web browsers support it natively. At the time of writing, the most recent versions of these browsers include:

This means that you can display raw, unstyled XML documents (files) directly in web browsers, with varying results.

The browsers use their own internal mechanisms to display XML. Internet Explorer (IE), for example, uses the default stylesheet defaultss.xsl , which is stored in a MSXML dynamic link library (DLL)—msxml.dll, msxml2.dll, or msxml3.dll. You can examine this stylesheet in IE by entering res://msxml3.dll/DEFAULTSS.xsl in the address bar. (This works for msxml.dll, msxml2.dll, or msxml3.dll, but not msxsml4.dll, the latest version.) If you have Visual Studio (http://msdn.microsoft.com/vstudio/), you can use the Resource Editor to edit and save this stylesheet back in the DLL (http://netcrucible.com/xslt/msxml-faq.htm#Q19).

To open an XML document such as time.xml (similar to start.xml), go to File Open File or File Open, depending on the browser, and select the document. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET & XML

.NET & XML

Niel M. Bornstein
XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald

Publisher Resources

ISBN: 0596007116Supplemental ContentErrata Page