• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to read XML file offline using a browser

 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am having difficulty opening up XML files offline (not connected or Internet/behind a proxy server) using Internet Explorer as it returns the following message:

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
The server did not understand the request, or the request was invalid. Error processing resource 'http://www.w3.org/TR/xhtm...


Below is the snippet of the XML document I am trying to open:

Firefox can open the same document but as flat file which looses some of the hierachical tree structure and cannot track the source of the nodes properly.
I would like to read its content the same way as an XML editor would, without having to purchase one since I only need it for viewing purposes.
I have been told that by changing the PUBLIC to SYSTEM to reference a local drive would resolve this but do not have the instruction.
Any assistance would be much appreciated.

Thanks a lot,
Jack




 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried Open Office? It seems to display XML rather nicely.

Bill
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have been told that by changing the PUBLIC to SYSTEM to reference a local drive would resolve this but do not have the instruction.




The instruction is change PUBLIC to SYSTEM.

This "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" should be replaced with "C:\\SomeDirectoryOnYourPC\\xhtml1-transitional.dtd".
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,

Thank you for responding to my threat.

The following changes was made to the original C:\Tmp\CAR.xml and having downloaded xhtml1-transitional.dtd to e:\\TMP as suggested:

<!DOCTYPE html SYSTEM "-//W3C//DTD XHTML 1.0 Transitional//EN" "e:\\TMP\\xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><script type="text/javascript">
.....

Now the error output is slightly different:

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

The character '>' was expected. Error processing resource 'file:///C:/Tmp/CAR.xml'. Line 2, Position 64

<!DOCTYPE html SYSTEM "-//W3C//DTD XHTML 1.0 Transitional//EN" "e:\\TMP\\xhtml1-transitional.dtd">
------------------...

Any ideas on why this is occurring?

Thanks a lot,

Jack
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic